Modules§
Macros§
- cols
- Build a slice of column expressions (optionally ordered) suitable for a
SELECTprojection. Each comma separated item becomes either an expression (parsed viaexpr!) or an ordered expression when followed byASCorDESC. - current_
timestamp_ ms - expr
- Parse a Rust expression into a typed SQL expression tree.
- impl_
executor_ transaction - Implement the
Executortrait for a transaction wrapper type by delegating each operation to an underlying connection object. - join
- Build a typed join tree from a concise SQL-like syntax.
- month_
to_ number - number_
to_ month - possibly_
parenthesized - Conditionally wrap a generated fragment in parentheses.
- send_
value - Sends the value through the channel and logs in case of error.
- truncate_
long - Truncate long strings for logging and error messages purpose.
Structs§
- Binary
Op - Column
Def - Column specification.
- Column
Ref - Reference to a column.
- Context
- Context
Updater - Create
Table Query Builder - Declare
Table Ref - Wrapper used when declaring table references in generated macros.
- Drop
Table Query Builder - Find
Order - Fixed
Decimal - Decimal wrapper enforcing static precision/scale.
- Generic
SqlWriter - Generic SQL writer.
- Insert
Into Query Builder - Interval
- Calendar-aware time interval.
- IsAggregate
Function - IsAlias
- IsAsterisk
- IsFalse
- IsQuestion
Mark - IsTrue
- Join
- Binary join with optional ON predicate.
- NA
- Ordered
- Query
Builder - RawQuery
- References
- Represents a foreign key constraint to another entity.
- RowLabeled
- Row with column labels.
- Rows
Affected - Result of a modifying operation (INSERT/UPDATE/DELETE).
- Select
Query Builder - Table
Ref - Table reference.
- Type
Decoded - Internally decoded type info for macros.
- UnaryOp
Enums§
- Action
- Referential action for foreign key updates or deletes.
- Binary
OpType - Default
Value Type - DynQuery
- Dyn compatible version of
Query - Either
Iterator - Iterator adapter for two types.
- Fragment
- Interval
Unit - Time interval units.
- Join
Type - SQL join type variants.
- Operand
- Order
- Passive
- Value wrapper for optional persistence.
- Primary
KeyType - Primary key participation.
- Query
- Executable query: raw SQL or prepared statement.
- Query
Result - Items from
Executor::run: rows or effects. - Unary
OpType - Value
- SQL value representation.
Traits§
- AsQuery
- AsValue
- Bidirectional conversion between Rust types and
Value. - Column
Trait - Trait exposing column definition and reference.
- Connection
- A live database handle capable of executing queries and spawning transactions.
- Create
Table Query - Dataset
- Queryable data source (table or join tree).
- Driver
- Backend connector and dialect.
- Drop
Table Query - Entity
- Database entity mapping.
- Error
Context - Provides the
contextmethod forResult. - Executor
- Async query execution.
- Expression
- Renderable SQL expression.
- Expression
Collection - Expression
Visitor - OpPrecedence
- Provides numeric precedence for expressions allowing sql writers to insert parentheses.
- Prepared
- Parameterized, backend-prepared query handle.
- Select
Query - SELECT query builder.
- SqlWriter
- SQL dialect printer.
- Transaction
- Transactional
Executorwithcommitandrollback.
Functions§
- as_
c_ string - Convenience wrapper converting into a
CString. - consume_
while - Consume a prefix of
inputwhile the predicate returns true, returning that slice. - error_
message_ from_ ptr - extract_
number - matches_
path - Determine if the trailing segments of a
syn::Pathmatch the expected identifiers. - print_
date - print_
timer - quote_
btree_ map - Quote a
BTreeMap<K, V>into tokens. - quote_
cow - Quote a
Cow<T>preserving borrowed vs owned status for generated code. - quote_
option - Quote an
Option<T>into tokens. - separated_
by - Write an iterator of items separated by a delimiter into a string.
- value_
to_ json - write_
escaped - Write, escaping occurrences of
searchchar withreplacewhile copying into buffer.
Type Aliases§
- Check
Passive - Error
- Error type.
- Result
- Result type.
- Row
- Row values matching
RowNames. - RowNames
- Shared column names.