New blog: using compile-time gather to validate db schema at program startup
Paolo Invernizzi
paolo.invernizzi at gmail.com
Wed Dec 17 15:41:09 UTC 2025
On Tuesday, 4 November 2025 at 00:40:15 UTC, Adam D. Ruppe wrote:
> https://dpldocs.info/this-week-in-arsd/Blog.Posted_2025_11_03.html
>
> This uses a combination of old and new(ish) D features to
> achieve something I'm not sure I've ever seen before.
> Interpolated sequences, opDispatch, static constructors build
> on top of a dynamically typed database query driver to provide
> schema validation not at runtime, not at compile time, but
> somewhere in between. See more at the link.
I missed that, interesting!
There's still something more that can be improved, actually we
have that at CT:
```
src/ops/sql/semantics.d(521,19): Error: uncaught CTFE exception
`object.Exception("role analysis_operator can't select table
aois. SQL: select count(leg_id) from aois where leg_id = $1 and
snapshot_id = $2 and aoi_id = $3")`
```
/Paolo
More information about the Digitalmars-d-announce
mailing list