Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Expand FromRow tuple impls to 16 (currently capped at 4)

オープン
#68 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
rust
領域
databases

調査の方向性

Start in hyperdb-api/src/result.rs at the existing FromRow tuple implementations around lines 758-787, and review §5 of docs/RUST_API_GAP_ANALYSIS.md for context. Extend the implementations through 16-tuples with a declarative macro, add real-query sanity tests for the requested arities, and update the trait rustdoc to describe the tuple cap.

索引モデルが issue の本文から書いたものです。

説明

enhancement

Summary

The FromRow blanket tuple impls only cover 1, 2, 3, 4-tuples. Common Rust DB crates (sqlx, rusqlite, tokio-postgres) go to 12 or 16. Rows with more than four columns must define a hand-written struct + FromRow impl even when the user just wants ad-hoc destructuring.

Current state

$ grep -n "FromRow for (Option" hyperdb-api/src/result.rs | wc -l
3

Plus the 1-tuple impl at result.rs:758, giving four total — see result.rs:758-787.

Original gap analysis: §5 of docs/RUST_API_GAP_ANALYSIS.md (predecessor repo).

Proposed work

  • Extend the tuple impls up to 16-tuple, matching sqlx. Generate them via a declarative macro to keep the code compact.
  • Add a few sanity tests for 5/8/12/16-tuple cases against a real query.
  • Document the tuple-cap in the trait rustdoc.

Backwards compatibility

Purely additive. Existing (Option<A>,) through (Option<A>, Option<B>, Option<C>, Option<D>) impls keep working unchanged.

Performance note

Pure type-system addition — zero runtime cost. Compile time grows slightly, but only for translation units that actually use the new arities.

Related

  • #61 — #[derive(FromRow)] reduces the demand for high-arity tuple impls (most users will reach for the derive instead). Tuple impls remain useful for ad-hoc destructuring without defining a struct.
主要言語
Rust
スター
2
フォーク
2
平均マージ
12時間 2分
マージ済み PR(30日)
60

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tableau/hyper-api-rust のほかの issue

tableau/hyper-api-rust の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。