Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#68 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
rust
Área
databases

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Rust
Estrellas
3
Forks
2
Merge medio
23 h 11 min
PR fusionados (30 d)
65

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tableau/hyper-api-rust

Todos los issues de tableau/hyper-api-rust

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.