Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#68 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust
Ambito
databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Rust
Stelle
2
Fork
2
Merge medio
12h 2m
PR unite (30g)
60

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tableau/hyper-api-rust

Tutte le issue di tableau/hyper-api-rust

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.