Crate tank_core

Crate tank_core 

Source

Re-exports§

pub use ::indoc;

Modules§

future
Asynchronous values.
sink
Asynchronous sinks.
stream

Macros§

impl_executor_transaction
Implement the Executor trait for a transaction wrapper type by delegating each operation to an underlying connection object.
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
DeclareTableRef
Wrapper used when declaring table references in generated macros.
FixedDecimal
Decimal wrapper enforcing compile-time width/scale.
GenericSqlWriter
Fallback generic SQL writer (closest to PostgreSQL / DuckDB conventions).
Interval
Join
Binary join with optional ON predicate.
Ordered
References
Foreign key reference to another Entity’s columns.
RowLabeled
Row with column labels.
RowsAffected
Metadata about modify operations (INSERT/UPDATE/DELETE).
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
EitherIterator
Polymorphic iterator adapter returning items from either variant.
Fragment
IntervalUnit
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.
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.
DataSet
Queryable data source (table or join tree).
Driver
Backend connector and SQL dialect provider.
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.
OpPrecedence
Provides numeric precedence for expressions allowing sql writers to insert parentheses.
Prepared
A parameterized, backend-prepared query handle.
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, panicking on interior NUL.
consume_while
Consume a prefix of input while the predicate returns true, returning that slice.
extract_number
matches_path
Determine if the trailing segments of a syn::Path match the expected identifiers.
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.

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.