Episode 1022 minutes
Zero-SQL Query<T> ORM, @controller DI & Hadid Forge
Build type-safe SQLite & PostgreSQL data layers with Query<T>, Generic BaseRepository<T>, @controller DI, and Hadid Forge.
Lesson Video Coming Soon
This episode's HD lesson video will appear directly in this player once published. Meanwhile, run and modify the live HADID v0.13 code lab right below!
Learning Objectives
- Model tables with @table("...") and Generic BaseRepository<T>
- Compose parameterized SQL pushdown queries via .query().where_eq().order_by_desc().take()
- Verify compile-time column checking and orm_unsafe_delete_all protection
Architecture Summary
HADID's Query<T> builder validates column names and value types at compile time. At runtime every parameter is bound safely on SQLite or pure-C17 PostgreSQL 17, and unfiltered .delete() is blocked by orm_unsafe_delete_all.
Live HADID v0.13 Code Lab
LIVE COMPILER
Episode 10 · Interactive Lab
main.had· Run with Ctrl / ⌘ + Enter
Run with Ctrl / ⌘ + Enter
Executes on the real HADID v0.13.0 Linux compiler inside a network-isolated container (async/await, closures, Generic fn<T> + where, Query<T>, loop-fused lambdas, html_render, crypto, SQLite :memory:, and full EN/TR syntax). Use the local `hadid` CLI for disk SQLite, live WebSocket/HTTP servers, and native AOT binaries.
Sign in with Digital HAT ID to earn Code Lab (+25 XP), Quiz (+50 XP), badges, and certificates.Sign In