Skip to main content

Module query

Module query 

Source
Expand description

The statements the builder renders; Query starts any of them.

SelectStatement, InsertStatement, UpdateStatement and DeleteStatement, with WITH queries and the clauses they share: conditions, CASE, ORDER BY, window frames, ON CONFLICT and RETURNING.

Macros§

all
Macro to easily create an Condition::all.
any
Macro to easily create an Condition::any.

Structs§

CaseStatement
CommonTableExpression
A table definition inside a WITH clause (WithClause).
Condition
Represents the value of an Condition::any or Condition::all: a set of disjunctive or conjunctive conditions.
ConditionHolder
DeleteStatement
Delete existing rows from the table
FrameClause
Frame clause
InsertStatement
Insert any new rows into an existing table
JoinExpr
Join expression used in select statement
LockClause
OnConflict
Query
Where a statement starts: Query::select(), Query::insert() and so on.
Returning
Shorthand for constructing ReturningClause
SelectExpr
Select expression used in select statement
SelectInto
The INTO clause in SELECT statement
SelectStatement
Select rows from an existing table
UpdateStatement
Update existing rows in the table
WindowStatement
Window expression
WithClause
A WITH clause can contain one or multiple common table expressions (CommonTableExpression).
WithQuery
A WITH query. A simple SQL query that has a WITH clause (WithClause).

Enums§

ConditionHolderContents
ConditionType
Frame
frame_start or frame_end clause
FrameType
Frame type
LockBehavior
List of lock behavior can be used in select statement
LockType
List of lock types that can be used in select statement
OnConflictAction
Represents ON CONFLICT (upsert) actions
OnConflictIdentifier
Represents either a column or an expression in the conflict targets
OnConflictTarget
Represents ON CONFLICT (upsert) targets
OnConflictUpdate
Represents strategies to update column in ON CONFLICT (upsert) actions
QueryStatement
One of the four table statements.
ReturningClause
RETURNING clause.
SelectDistinct
List of distinct keywords that can be used in select statement
SelectIntoTableModifier
The table type of target table of SELECT INTO clause
SubQueryStatement
A statement nested in another: an expression’s subquery or a derived table.
UnionType
List of union types that can be used in union clause
WindowSelectType
Window type in SelectExpr

Traits§

ConditionalStatement
IntoCondition
A helper trait.
OrderedStatement
OverStatement
QueryStatementBuilder
QueryStatementWriter
SelectExprTrait
Extension methods for building a SelectExpr from an expression.

Type Aliases§

Cond