Pure SQL Tutorial
Pure SQL Tutorial
This tutorial shows .sql template execution with sqltmplx and dbx.SQL*.
When to Use
- SQL-first teams that keep query logic in
.sqlfiles. - Workloads that need template statement reuse with dbx execution APIs.
Complete Example
Pitfalls
- Rebuilding statement lookup in loops instead of caching.
- Template parameter names not aligned with bound structs/maps.
Verify
go test ./dbx/sqltmplx/...