zanith

Advanced

The query surface beyond CRUD. Each topic has a dedicated page — this one is the index.

Transactions, escape hatches, JSON

PageCovers
[Transactions](/docs/advanced/transactions)BEGIN/COMMIT/ROLLBACK semantics, isolation levels, the typed tx context.
[Raw SQL](/docs/advanced/raw-sql)$raw tagged template, typed result rows, parameter binding via ${}.
[JSONB](/docs/advanced/jsonb).jsonText, .jsonContains, .jsonHasKey chained on field references.

Compound queries

PageCovers
[Subqueries](/docs/advanced/subqueries)exists, notExists, inSubquery, correlated patterns.
[Set operations](/docs/advanced/set-operations)union, intersect, except and their All variants. Parameters renumbered onto a single shared list.
[LATERAL joins](/docs/advanced/lateral-joins)lateralJoin — the standard tool for top-N per group and a handful of patterns plain JOIN can't express.
[Window functions](/docs/advanced/windows)rowNumber, rank, denseRank, sumOver, avgOver, countOver, minOver, maxOver.

Pubsub and primitives

PageCovers
[LISTEN / NOTIFY](/docs/advanced/listen-notify)Postgres pubsub via listen, unlisten, notify. Channel names quoted as identifiers; payloads bound as parameters.
[Expression builders](/docs/advanced/expressions)Standalone constructors — caseWhen, coalesce, nullIf, fn, lit, fieldRef, plus the JSON / array / range helper families.

Looking for something else?

Errors, query logging, and observability live under Production. The complete export list (every adapter, dialect, helper, type) lives at /docs/reference.