Skip to main content

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.
current_timestamp_ms
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 column.
Context
ContextUpdater
CreateTableQueryBuilder
DeclareTableRef
Wrapper used when declaring table references in generated macros.
DropTableQueryBuilder
FindOrder
FixedDecimal
Decimal wrapper enforcing static precision/scale.
GenericSqlWriter
Generic SQL writer.
InsertIntoQueryBuilder
Interval
Calendar-aware time interval.
IsAggregateFunction
IsAlias
IsAsterisk
IsFalse
IsQuestionMark
IsTrue
Join
Binary join with optional ON predicate.
NA
Ordered
QueryBuilder
RawQuery
References
Represents a foreign key constraint to another entity.
RowLabeled
Row with column labels.
RowsAffected
Result of a modifying operation (INSERT/UPDATE/DELETE).
SelectQueryBuilder
TableRef
Table reference.
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
Iterator adapter for two types.
Fragment
IntervalUnit
Time interval units.
JoinType
SQL join type variants.
Operand
Order
Passive
Value wrapper for optional persistence.
PrimaryKeyType
Primary key participation.
Query
Executable query: raw SQL or prepared statement.
QueryResult
Items from Executor::run: rows or effects.
UnaryOpType
Value
SQL value representation.

Traits§

AsQuery
AsValue
Bidirectional conversion between Rust types and Value.
ColumnTrait
Trait exposing 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 dialect.
DropTableQuery
Entity
Database entity mapping.
ErrorContext
Provides the context method for Result.
Executor
Async query execution.
Expression
Renderable SQL expression.
ExpressionCollection
ExpressionVisitor
OpPrecedence
Provides numeric precedence for expressions allowing sql writers to insert parentheses.
Prepared
Parameterized, backend-prepared query handle.
SelectQuery
SELECT query builder.
SqlWriter
SQL dialect printer.
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
write_escaped
Write, escaping occurrences of search char with replace while copying into buffer.

Type Aliases§

CheckPassive
Error
Error type.
Result
Result type.
Row
Row values matching RowNames.
RowNames
Shared column names.

Derive Macros§

Entity