Expand description
Typed, dialect-aware query builder.
QueryBuilder is parameterized over a Dialect marker and uses
by-value (self) chaining: every mutator takes and returns Self. The
terminal QueryBuilder::to_sql compiles to (sql, binds).
Structs§
- Cte
- A common table expression (
WITH/WITH RECURSIVE). - Join
- A
JOINclause: a kind, a target table, and zero or moreONconditions. - Join
Clause - Accumulator passed to
join/left_join/… closures to buildONconditions. - Lock
- A row-locking clause appended to a
SELECT(FOR UPDATE/FOR SHARE, optionallySKIP LOCKED/NOWAIT). - OnConflict
- An
ON CONFLICTspecification attached to anINSERT. - Query
Builder - Typed, dialect-aware SQL query builder.
Enums§
- AggFn
- A SQL aggregate function for the
select_*aggregate helpers. - Conflict
Action - What to do when an
INSERThits a conflict (seeOnConflict). - Having
- A
HAVINGcondition (SELECT-only, rendered afterGROUP BY). - Join
Cond - A single
ONcondition of aJoin. - Join
Kind - The kind of SQL
JOIN. - Lock
Strength - The strength of a row-locking clause.
- Lock
Wait - The optional wait behavior of a row-locking clause.
- Method
- Which kind of statement is being built.
- Order
- Sort direction for an
ORDER BYcolumn. - Select
Expr - A structured
SELECT-list expression (aggregate or aliased column).