The brief
I wanted composable, safe SQL in Go without an ORM or reflection. The result is a small query builder that uses only the standard library.
What it does
Full statements. SELECT with joins, grouping, CTEs and subqueries. INSERT with bulk values and ON CONFLICT. UPDATE and DELETE, with RETURNING where the database supports it.
Nested conditions. A recursive predicate tree produces correctly parenthesised WHERE groups.
Correct placeholders. Indices such as $1 and $2 stay right across composed subqueries.
Dialects. PostgreSQL and MySQL are built in, behind a dialect abstraction.
Safe branching. Clone branches a shared base builder without mutating it, and typed sentinel errors make failures easy to handle.