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. - 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 table column.
- Context
- Context
Updater - Create
Table Query Builder - Declare
Table Ref - Wrapper used when declaring table references in generated macros.
- Drop
Table Query Builder - Fixed
Decimal - Decimal wrapper enforcing compile-time width/scale.
- Generic
SqlWriter - Fallback generic SQL writer (closest to PostgreSQL / DuckDB conventions).
- Insert
Into Query Builder - Interval
- A time interval supporting months, days and nanoseconds.
- Join
- Binary join with optional ON predicate.
- NA
- Ordered
- Query
Builder - Query
Metadata - RawQuery
- References
- Foreign key reference to another Entity’s columns.
- RowLabeled
- Row with column labels.
- Rows
Affected - Metadata about modifying operations (INSERT/UPDATE/DELETE).
- Select
Query Builder - Table
Ref - Schema-qualified table reference (optional alias).
- 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 - Polymorphic iterator adapter returning items from either variant.
- Fragment
- Interval
Unit - Units used to represent different parts of an
Intervalvalue. - Join
Type - SQL join variants.
- Operand
- Order
- Passive
- Wrapper marking whether a column should be considered set or skipped (passive) on INSERT.
- Primary
KeyType - Indicates if and how a column participates in the primary key.
- Query
- Executable query: raw SQL or prepared statement.
- Query
Result - Items from
Executor::run: rows or effects. - Query
Type - Unary
OpType - Value
- SQL value representation used across Tank.
Traits§
- AsQuery
- AsValue
- Convert both ways between Rust types and
Value(plus simple parsing). - Column
Trait - Helper trait for types that expose an underlying 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 SQL dialect provider.
- Drop
Table Query - Entity
- A table-mapped record with schema and CRUD helpers.
- Error
Context - Provides the
contextmethod forResult. - Executor
- Async query executor bound to a concrete
Driver. - Expression
- Renderable SQL expression.
- Expression
Collection - OpPrecedence
- Provides numeric precedence for expressions allowing sql writers to insert parentheses.
- Prepared
- A parameterized, backend-prepared query handle.
- Select
Query - SqlWriter
- Dialect printer converting semantic constructs into concrete SQL strings.
- 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
Type Aliases§
- Check
Passive - Error
- Crate-wide error alias using
anyhow. - Result
- Crate-wide result alias using
anyhowfor flexible error context. - Row
- Owned row value slice matching
RowNameslength. - RowNames
- Shared reference-counted column name list.