Automatically infer nullable columns

Aperta
#226 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
postgresql, rust

Direzione di ricerca

Start by reading the nullability handling in cornucopia and compare it with the sqlc behavior described in the issue. Determine whether PostgreSQL column nullability can be inferred in the generation flow and what technical constraints apply. Done means deciding and documenting an approach for automatic inference, with coverage for nullable columns; the issue names no specific source files or tests.

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

Descrizione

I love cornucopia! I used sqlc in Go, and this is exactly the thing I needed in Rust!

Having used sqlc though, I was wondering whether the nullability of columns could be handled automatically. At the moment, when I use cornucopia, this is the only thing that results in panics in my code because I forget to mark certain columns as nullable. In sqlc, this seems to be inferred automatically (pointers are returned for nullable columns). Could this also be done in cornucopia or is there some technical limitation preventing this?

Lingua principale
Rust
Stelle
1.2k
Fork
77
Merge medio
5g 12h
PR unite (30g)
1

Preparare l'ambiente

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 cornucopia-rs/cornucopia

Tutte le issue di cornucopia-rs/cornucopia

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.