Skip to main content

Module stmt

Module stmt 

Source
Expand description

Typed statement, expression, and query builder types.

Structs§

Assignment
A typed assignment produced by the insert, remove, set, and patch combinators.
Association
A typed handle to a model association (relation).
Batch
A batch of queries composed into a single statement.
CreateMany
A builder for inserting multiple records of the same model in a single statement.
Delete
A typed delete statement.
Expr
A typed expression in the Toasty query language.
Insert
A typed insert statement for model M.
Json
A field wrapper that stores T as a JSON-encoded string in the database.
List
A sized marker type representing “list of M”.
OrderBy
An ORDER BY clause containing one or more ordering expressions.
Page
A page of results from a cursor-based paginated query.
Paginate
Cursor-based pagination over a Query.
Path
A typed path from a root model T to a field of type U.
Projection
A sequence of field indices describing how to navigate into a nested value.
Query
A typed query that selects records from the database.
Statement
A typed wrapper around an untyped stmt::Statement.
Update
A typed update statement.

Enums§

Type
Statement-level type system for values and expressions within Toasty’s query engine.
Value
A dynamically typed value used throughout Toasty’s query engine.

Traits§

Assign
Apply a field mutation to an update statement’s Assignments map.
Auto
A field type that supports automatic value generation.
IntoExpr
Convert a value into an Expr<T>.
IntoInsert
Convert a value into an Insert statement.
IntoScope
Convert a query into a scope statement over model M.
IntoStatement
Convert a value into a Statement.
Numeric
A numeric type that has a representable “one” value.

Functions§

add
Add a value to a numeric field (col = col + value).
apply
Apply multiple operations to a single field.
batch
Compose multiple independent queries into a single batched statement.
clear
Remove every element from an ordered collection field.
decrement
Decrement a numeric field by one.
extend
Append every element of a list to an ordered collection field.
in_list
Returns an expression that tests whether lhs is contained in rhs.
increment
Increment a numeric field by one.
insert
Insert a value into a collection field.
patch
Partially update a sub-field of an embedded type.
pop
Drop the last element of an ordered collection field.
push
Append one element to an ordered collection field (e.g. Vec<scalar>).
remove
Remove a value from a collection field.
remove_at
Drop the element at the given index from an ordered collection field.
set
Replace a field’s value entirely.
subtract
Subtract a value from a numeric field (col = col - value).