Install Quarry and render your first query.
Quarry starts with a configured dialect, then lets every builder inherit that choice. The result is straightforward Go code with predictable SQL output.
Install
go get github.com/sphireinc/quarry
scan,
hydra, and codex.
Build the first query
qq := quarry.New(quarry.Postgres)
q := qq.Select("id", "email").
From("users").
Where(quarry.Eq("status", "active"))
sql, args, err := q.ToSQL()
SELECT id, email FROM users WHERE status = $1
[]any{"active"}
SELECT id, email FROM users WHERE status = ?
[]any{"active"}
Identifiers and values
Values bind automatically
Use predicates like Eq, Like, and Raw(...)
to bind values instead of interpolating them.
Identifiers stay explicit
Use quarry.T, quarry.C, and aliases when you want
Quarry to quote table and column names safely.
Dialect stays on the Quarry instance
Create one configured qq and let every builder inherit the same policy.
Next steps
Learn dynamic filters
See how optional predicates, grouped filters, and safe sorting work together.
Open the guide →Explore the core builders
Inspect the fluent builder surface, including joins, grouping, and returning support.
Core reference →