On Wed, Jan 28, 2026 at 05:25:18PM +0000, Andy Valencia via Digitalmars-d-learn
wrote:
> 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.
Have you seen this?
https://dpldocs.info/this-week-in-d/Blog.Posted_2025_11_03.html
In principle, it should be possible for D to use introspection to
automate REPLACE INTO operations.
T
--
I ate a clock, and it was very time-consuming. I'm going back four seconds.