SQL store hardening - Internal cleanup
- Lingua principale
- Rust
- Stelle
- 78
- Fork
- 129
- Merge medio
- 4g 14h
- PR unite (30g)
- 52
Descrizione
* **Replace positional row reads?** Around 70 reads use `row.get(0)` beside hand-written column lists, so column reordering can map values incorrectly. I'm not sure there's too much value in this, as long as queries are wlel tested
* Use named columns or per-table row mappers with canonical column-list constants.
* **Centralize integer conversions.** Route remaining `as i64` casts through the shared `u64`/`i64` helpers.
* **Split migration and settings code.**
* Move `store.sql` into `migrations/`.
* Split `db_management/utils.rs` into migration, settings, and macro modules.
* Rename `account/helpers.rs` to `account/rows.rs` and place row mappers there.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Look at the SQL store files, particularly store.sql and db_management/utils.rs. Identify the 70+ positional row reads (row.get(0)) and replace them with named columns or row mappers. Centralize integer conversions using existing u64/i64 helpers. Split the migration and settings code by moving store.sql to migrations/ and refactoring utils.rs. Rename account/helpers.rs to account/rows.rs for row mappers. Run existing database tests to ensure correctness.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- backend, database
- Tipo di issue
- Refactoring
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 50/100