Module query

Source
Expand description

Query statements (select, insert, update & delete).

§Usage

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
Cycle
For recursive WithQuery WithClauses the CYCLE sql clause can be specified to avoid creating an infinite traversals that loops on graph cycles indefinitely. You specify an expression that identifies a node in the graph and that will be used to determine during the iteration of the execution of the query when appending of new values whether the new values are distinct new nodes or are already visited and therefore they should be added again into the result.
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
Shorthand for constructing any table query
Returning
Shorthand for constructing ReturningClause
Search
For recursive WithQuery WithClauses the traversing order can be specified in some databases that support this functionality.
SelectExpr
Select expression used 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§

ConditionExpression
Represents anything that can be passed to an Condition::any or Condition::all’s Condition::add method.
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
OnConflictTarget
Represents ON CONFLICT (upsert) targets
OnConflictUpdate
Represents strategies to update column in ON CONFLICT (upsert) actions
QueryStatement
All available types of table query
ReturningClause
RETURNING clause.
SearchOrder
For recursive WithQuery WithClauses the traversing order can be specified in some databases that support this functionality.
SelectDistinct
List of distinct keywords that can be used in select statement
SubQueryStatement
UnionType
List of union types that can be used in union clause
WindowSelectType
Window type in SelectExpr

Traits§

ConditionalStatement
IntoCondition
OrderedStatement
OverStatement
QueryStatementBuilder
QueryStatementWriter

Type Aliases§

Cond