Versions in this module Expand all Collapse all v0 v0.1.0 Oct 11, 2026 Changes in this version + const LogicAnd + const LogicNot + const LogicOr + const OpAdd + const OpConcat + const OpDiv + const OpEq + const OpGreater + const OpGreaterEq + const OpIn + const OpIsDistinctFrom + const OpIsFalse + const OpIsNotDistinctFrom + const OpIsNotNull + const OpIsNull + const OpIsTrue + const OpIsUnknown + const OpLess + const OpLessEq + const OpLike + const OpMod + const OpMul + const OpNotEq + const OpNotIn + const OpNotLike + const OpSub + var ErrNoLikeEscape = errors.New(...) + var ErrUnknownValue = errors.New("sqlb: value is not one of its type's constants") + var ErrZeroExpr = errors.New(...) + var FrameModeValues = []FrameMode + var NullsOrderValues = []NullsOrder + var OpValues = []string + var SortDirectionValues = []SortDirection + func CheckedFunctionName(a *render.Args, name, what string) string + func CheckedKeyword(a *render.Args, s, what string) string + func CheckedOperator(a *render.Args, op, what string) string + func EscapeLike(s string) string + func PredicateSQL(p Predicate, a *render.Args) string + func QuoteList(d render.Dialect, names []string) string + func Row(items ...render.SQLer) render.SQLer + type AggOption func(*AggSpec) + func Distinct() AggOption + type AggSpec struct + Distinct bool + Inner func(a *render.Args) string + Suffix func(a *render.Args) string + type CaseBuilder struct + func Case[T any]() CaseBuilder[T] + func (c CaseBuilder[T]) Else(e Expr[T]) Expr[T] + func (c CaseBuilder[T]) End() Expr[*T] + func (c CaseBuilder[T]) When(cond Predicate, then Expr[T]) CaseBuilder[T] + type Expr struct + func Add[T Number](l, r Expr[T]) Expr[T] + func Aggregate[R any](name string, args []render.SQLer, opts ...AggOption) Expr[R] + func As[T any](e Expr[T], name string) Expr[T] + func AssertNotNull[T any](e Expr[*T]) Expr[T] + func Avg[T Number](e Expr[T], opts ...AggOption) Expr[float64] + func Binary[R any](left render.SQLer, op string, right render.SQLer) Expr[R] + func BoolExpr(p Predicate) Expr[bool] + func Cast[R, T any](e Expr[T], sqlType string) Expr[R] + func Coalesce[T any](first Expr[T], rest ...Expr[T]) Expr[T] + func Col[T any](t Table, name string) Expr[T] + func Concat(parts ...Expr[string]) Expr[string] + func Count(opts ...AggOption) Expr[int64] + func CountOf[T any](e Expr[T], opts ...AggOption) Expr[int64] + func Div[T Number](l, r Expr[T]) Expr[T] + func Fn[R any](name string, args ...render.SQLer) Expr[R] + func Literal[T any](sql string) Expr[T] + func Lower(e Expr[string]) Expr[string] + func Max[T any](e Expr[T], opts ...AggOption) Expr[T] + func Min[T any](e Expr[T], opts ...AggOption) Expr[T] + func Mod[T Number](l, r Expr[T]) Expr[T] + func Mul[T Number](l, r Expr[T]) Expr[T] + func Neg[T Number](e Expr[T]) Expr[T] + func New[T any](render func(a *render.Args) string) Expr[T] + func NullIf[T any](l, r Expr[T]) Expr[*T] + func Nullable[T any](e Expr[T]) Expr[*T] + func OutputCol[T any](name string) Expr[T] + func OverNamed[T any](e Expr[T], name string) Expr[T] + func Over[T any](e Expr[T], w Window) Expr[T] + func Param[T any](v T) Expr[T] + func Sub[T Number](l, r Expr[T]) Expr[T] + func Sum[T Number](e Expr[T], opts ...AggOption) Expr[T] + func Upper(e Expr[string]) Expr[string] + func (e Expr[T]) Name() string + func (e Expr[T]) SQL(a *render.Args) string + func (e Expr[T]) Table() Table + type FrameBound struct + func CurrentRow() FrameBound + func Following(n int) FrameBound + func FollowingExpr(sql string) FrameBound + func Preceding(n int) FrameBound + func PrecedingExpr(sql string) FrameBound + func UnboundedFollowing() FrameBound + func UnboundedPreceding() FrameBound + type FrameExclude string + type FrameMode string + const FrameRange + const FrameRows + type NullsOrder string + const NullsFirst + const NullsLast + type Number interface + type OrderTerm struct + Direction SortDirection + Expr func(a *render.Args) string + Nulls NullsOrder + Using string + func OrderBy[T any](e Expr[T], dir SortDirection) OrderTerm + func (t OrderTerm) WriteSQL(b *strings.Builder, a *render.Args) + type Predicate interface + WriteSQL func(b *strings.Builder, args *render.Args) + func And(preds ...Predicate) Predicate + func Between[T any](e Expr[T], lo, hi T) Predicate + func Compare(left render.SQLer, op string, right render.SQLer) Predicate + func Contains(e Expr[string], value string) Predicate + func ContainsFold(e Expr[string], value string) Predicate + func EndsWith(e Expr[string], value string) Predicate + func EndsWithFold(e Expr[string], value string) Predicate + func EqExpr[T any](left, right Expr[T]) Predicate + func EqFold(e Expr[string], value string) Predicate + func Eq[T any](e Expr[T], v T) Predicate + func False() Predicate + func GreaterEqExpr[T any](left, right Expr[T]) Predicate + func GreaterEq[T any](e Expr[T], v T) Predicate + func GreaterExpr[T any](left, right Expr[T]) Predicate + func Greater[T any](e Expr[T], v T) Predicate + func InExprs[T any](e Expr[T], items ...Expr[T]) Predicate + func InFold(e Expr[string], values ...string) Predicate + func In[T any](e Expr[T], values ...T) Predicate + func IsNotNull[T any](e Expr[T]) Predicate + func IsNull[T any](e Expr[T]) Predicate + func LessEqExpr[T any](left, right Expr[T]) Predicate + func LessEq[T any](e Expr[T], v T) Predicate + func LessExpr[T any](left, right Expr[T]) Predicate + func Less[T any](e Expr[T], v T) Predicate + func Like(e Expr[string], pattern string) Predicate + func Not(p Predicate) Predicate + func NotBetween[T any](e Expr[T], lo, hi T) Predicate + func NotContains(e Expr[string], value string) Predicate + func NotEqExpr[T any](left, right Expr[T]) Predicate + func NotEq[T any](e Expr[T], v T) Predicate + func NotInFold(e Expr[string], values ...string) Predicate + func NotIn[T any](e Expr[T], values ...T) Predicate + func NotLike(e Expr[string], pattern string) Predicate + func Or(preds ...Predicate) Predicate + func PredicateOf(render func(a *render.Args) string) Predicate + func RowEq(l, r render.SQLer) Predicate + func RowGreater(l, r render.SQLer) Predicate + func RowIn(row render.SQLer, rows ...render.SQLer) Predicate + func RowLess(l, r render.SQLer) Predicate + func RowNotIn(row render.SQLer, rows ...render.SQLer) Predicate + func StartsWith(e Expr[string], value string) Predicate + func StartsWithFold(e Expr[string], value string) Predicate + func True() Predicate + type SortDirection string + const SortAsc + const SortDesc + type Source interface + SourceAlias func() string + SourceSQL func(a *render.Args) string + func Derived(body Statement, alias string) Source + func SourceOf(alias string, render func(a *render.Args) string) Source + type Statement interface + WriteSQL func(b *strings.Builder, args *render.Args) + type Table struct + Alias string + Name string + Schema string + func Ref(src Source) Table + func (t Table) Qualified(d render.Dialect) string + func (t Table) Qualifier(d render.Dialect) string + func (t Table) SQL(d render.Dialect) string + func (t Table) SourceAlias() string + func (t Table) SourceSQL(a *render.Args) string + type WinFn struct + func DenseRank() WinFn[int64] + func FirstValue[T any](e Expr[T]) WinFn[*T] + func LastValue[T any](e Expr[T]) WinFn[*T] + func NewWinFn[T any](render func(a *render.Args) string) WinFn[T] + func NthValue[T any](e Expr[T], n int) WinFn[*T] + func Rank() WinFn[int64] + func RowNumber() WinFn[int64] + func (f WinFn[T]) Over(w Window) Expr[T] + func (f WinFn[T]) OverNamed(name string) Expr[T] + type Window struct + func NewWindow() Window + func (w Window) Exclude(x FrameExclude) Window + func (w Window) Frame(mode FrameMode, start, end FrameBound) Window + func (w Window) OrderBy(ts ...OrderTerm) Window + func (w Window) PartitionBy(es ...render.SQLer) Window + func (w Window) WriteSQL(b *strings.Builder, a *render.Args)