Skip to content

GoObjectOrientedQuerying

A type-safe, fluent, zero-dependency SQL query builder for Go inspired by jOOQ.
gooq

Typed columns

Field[T] columns make comparisons type-checked at compile time: a Field[int64] only compares against an int64.

Typed rows

Positional RecordN row types preserve each projected column’s Go type by position, with no reflection at the call site.

Compile-time clause order

Step interfaces turn the SQL clause order into a type concern: an invalid order does not compile.

Many dialects, one AST

A single query renders to PostgreSQL or SQLite at execution time.

Live code generation

Generate typed table accessors directly from a database by introspecting information_schema.

Zero dependencies

The core library uses only the Go standard library.