Ancestors

Toot

Written by 0xC0DEC0DE07E8 on 2025-01-07 at 14:59

Why do portions of my result object from a sqlx::query_as INNER JOIN where all the fields/columns are NOT NULL force me to have Option-wrapping the subquery bits? Is that a bug?

I'm not actually good at SQL, so I could be wrong, but an INNER JOIN means that we're guaranteed to have all the columns, right?

[#]Rust #RustLang #sqlx #sqlite #sql

=> More informations about this toot | More toots from c0dec0dec0de@hachyderm.io

Descendants

Written by 0xC0DEC0DE07E8 on 2025-01-07 at 15:27

Immediate answer is that I can override it by telling sqlx, that no, actually those columns are definitely NOT NULL

https://docs.rs/sqlx/latest/sqlx/macro.query.html#type-overrides-output-columns

=> More informations about this toot | More toots from c0dec0dec0de@hachyderm.io

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113787663088731853
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
227.791771 milliseconds
Gemini-to-HTML Time
0.557457 milliseconds

This content has been proxied by September (ba2dc).