Versions in this module Expand all Collapse all v0 v0.2.0 Aug 25, 2026 Changes in this version + var ErrInvalidStatement = errors.New("invalid query statement") + type CTE struct + Columns []string + Name string + Query Query + Recursive bool + type Column struct + Alias string + Expr Expression + type Compound struct + All bool + Op SetOp + OrderBy []Order + Paging *Paging + Queries []Query + With []CTE + func Except(queries ...Query) Compound + func ExceptAll(queries ...Query) Compound + func Intersect(queries ...Query) Compound + func IntersectAll(queries ...Query) Compound + func Union(queries ...Query) Compound + func UnionAll(queries ...Query) Compound + func (c Compound) SQL(d database.Dialect) (string, []any, error) + type Directives struct + Filters []Filter + Page Page + Sort []Sort + Where Predicate + type Expression struct + func Col(parts ...string) Expression + func Fn(name string, args ...any) Expression + func Raw(sql string) Expression + func Val(v any) Expression + func (e Expression) As(alias string) Column + func (e Expression) Eq(v any) Predicate + func (e Expression) Ge(v any) Predicate + func (e Expression) Gt(v any) Predicate + func (e Expression) In(vals ...any) Predicate + func (e Expression) IsNotNull() Predicate + func (e Expression) IsNull() Predicate + func (e Expression) Le(v any) Predicate + func (e Expression) Like(v any) Predicate + func (e Expression) Lt(v any) Predicate + func (e Expression) Ne(v any) Predicate + type Field struct + Expr Expression + Name string + type FieldUse string + const FieldUseFilter + const FieldUseSort + type Filter struct + Field string + Op Op + Value any + type Op string + const OpEq + const OpGe + const OpGt + const OpIn + const OpIsNotNull + const OpIsNull + const OpLe + const OpLike + const OpLt + const OpNe + type Order struct + Descending bool + Expr Expression + type Page struct + Number int + Size int + type Paging struct + Fetch int + Offset int + type PagingRenderer interface + RenderPaging func(w Writer, offset, fetch int) + type Predicate struct + func And(preds ...Predicate) Predicate + func Not(p Predicate) Predicate + func Or(preds ...Predicate) Predicate + type Projection struct + Fields []Field + From TableRef + Key Field + With []CTE + func (p Projection) Statements(d database.Dialect, dir Directives) (Statements, error) + type Query interface + type Select struct + Columns []Column + Distinct bool + From TableRef + GroupBy []Expression + Having Predicate + OrderBy []Order + Paging *Paging + Where Predicate + With []CTE + func (s Select) SQL(d database.Dialect) (string, []any, error) + type SetOp string + const SetExcept + const SetIntersect + const SetUnion + type Sort struct + Descending bool + Field string + type Statement struct + Args []any + SQL string + type Statements struct + Count Statement + Page Statement + type TableRef struct + func Derived(q Query) TableRef + func Table(name string) TableRef + func (t TableRef) As(alias string) TableRef + func (t TableRef) FullJoin(right TableRef, on Predicate) TableRef + func (t TableRef) Join(right TableRef, on Predicate) TableRef + func (t TableRef) LeftJoin(right TableRef, on Predicate) TableRef + func (t TableRef) RightJoin(right TableRef, on Predicate) TableRef + type UnknownFieldError struct + Field string + Use FieldUse + func (e *UnknownFieldError) Error() string + type UnknownOperatorError struct + Op Op + func (e *UnknownOperatorError) Error() string + type Writer struct + func (w Writer) Bind(v any) + func (w Writer) SQL(s string)