New blog: using compile-time gather to validate db schema at program startup
H. S. Teoh
hsteoh at qfbox.info
Tue Nov 4 02:48:03 UTC 2025
On Tue, Nov 04, 2025 at 12:40:15AM +0000, Adam D. Ruppe via Digitalmars-d-announce 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.
IOW, at compile-time collect information about DB columns from the
interpolated string, and generate runtime code to emit .prepareStatement
calls?
T
--
It is the quality rather than the quantity that matters. -- Lucius Annaeus Seneca
More information about the Digitalmars-d-announce
mailing list