Skip to Content
fusion-orm
Querying

Querying

Conditions, ordering, selection, scopes, raw clauses, and the raw-SQL escape hatches.

The querying section covers everything between "open a database" and "execute": how chains accumulate WHERE conditions, how rows are ordered and paginated, how columns are selected, and how to drop down to raw SQL when the chain is not enough.

Every chainable returns a derivative *DB and never mutates the receiver — see Chaining & copy-on-write for the session model. To see what a chain will run, use ToSQL or DryRun (Raw SQL & DryRun).

Dialects

Examples render SQLite and PostgreSQL side by side. Both dialects ship in-tree; builders branch on dialect capabilities, never on name strings.