On Tuesday, 27 January 2026 at 20:15:53 UTC, monkyyy wrote:
I dont like the api's people make for deserialization, this looks like a bad one. Look for something that parses an entire "row" as a struct that way your passing bundles of types already.

I wrestled a smaller/simpler SQLite3 into a module I could wrap my head around. For deserialization, yes, pulling to a struct is quite tidy--I even got it so it can match up column and struct field names. If you select a subset of the columns, I went with extracting to an explicitly typed tuple. If any field is incompatible with the tuple slot you provided, you get an exception.

Writing is much less satisfactory. The libsqlite3 doesn't have introspection in the REPLACE INTO api, nor any related ones--so it all has to be positional. I even asked on their forum, but didn't get any responses.


Andy

https://sources.vsta.org:7100/tiny/file?name=sqlite.d&ci=tip

Reply via email to