Crate tank

Crate tank 

Source

Modules§

future
Asynchronous values.
indoc
githubcrates-iodocs-rs
sink
Asynchronous sinks.
stream

Macros§

cols
Build a slice of column expressions (optionally ordered) suitable for a SELECT projection. Each comma separated item becomes either an expression (parsed via expr!) or an ordered expression when followed by ASC or DESC.
expr
Parse a Rust expression into a typed SQL expression tree.
impl_executor_transaction
Implement the Executor trait 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§

BinaryOp
ColumnDef
Column specification.
ColumnRef
Reference to a table column.
Context
ContextUpdater
CreateTableQueryBuilder
DeclareTableRef
Wrapper used when declaring table references in generated macros.
DropTableQueryBuilder
FixedDecimal
Decimal wrapper enforcing compile-time width/scale.
GenericSqlWriter
Fallback generic SQL writer (closest to PostgreSQL / DuckDB conventions).
InsertIntoQueryBuilder
Interval
A time interval supporting months, days and nanoseconds.
Join
Binary join with optional ON predicate.
NA
Ordered
QueryBuilder
QueryMetadata
RawQuery
References
Foreign key reference to another Entity’s columns.
RowLabeled
Row with column labels.
RowsAffected
Metadata about modifying operations (INSERT/UPDATE/DELETE).
SelectQueryBuilder
TableRef
Schema-qualified table reference (optional alias).
TypeDecoded
Internally decoded type info for macros.
UnaryOp

Enums§

Action
Referential action for foreign key updates or deletes.
BinaryOpType
DefaultValueType
DynQuery
Dyn compatible version of Query
EitherIterator
Polymorphic iterator adapter returning items from either variant.
Fragment
IntervalUnit
Units used to represent different parts of an Interval value.
JoinType
SQL join variants.
Operand
Order
Passive
Wrapper marking whether a column should be considered set or skipped (passive) on INSERT.
PrimaryKeyType
Indicates if and how a column participates in the primary key.
Query
Executable query: raw SQL or prepared statement.
QueryResult
Items from Executor::run: rows or effects.
QueryType
UnaryOpType
Value
SQL value representation used across Tank.

Traits§

AsQuery
AsValue
Convert both ways between Rust types and Value (plus simple parsing).
ColumnTrait
Helper trait for types that expose an underlying column definition and reference.
Connection
A live database handle capable of executing queries and spawning transactions.
CreateTableQuery
DataSet
Queryable data source (table or join tree).
Driver
Backend connector and SQL dialect provider.
DropTableQuery
Entity
A table-mapped record with schema and CRUD helpers.
ErrorContext
Provides the context method for Result.
Executor
Async query executor bound to a concrete Driver.
Expression
Renderable SQL expression.
ExpressionCollection
OpPrecedence
Provides numeric precedence for expressions allowing sql writers to insert parentheses.
Prepared
A parameterized, backend-prepared query handle.
SelectQuery
SqlWriter
Dialect printer converting semantic constructs into concrete SQL strings.
Transaction
Transactional Executor with commit and rollback.

Functions§

as_c_string
Convenience wrapper converting into a CString.
consume_while
Consume a prefix of input while the predicate returns true, returning that slice.
error_message_from_ptr
extract_number
matches_path
Determine if the trailing segments of a syn::Path match 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§

CheckPassive
Error
Crate-wide error alias using anyhow.
Result
Crate-wide result alias using anyhow for flexible error context.
Row
Owned row value slice matching RowNames length.
RowNames
Shared reference-counted column name list.

Derive Macros§

Entity