Skip to main content

Module sql

Module sql 

Source
Expand description

Shared SQL planning helpers for SQL-speaking database adapters.

Structs§

ColumnToAdd
A column missing from an existing table and planned for additive creation.
IndexToCreate
A standalone index missing from the database and planned for creation.
MigrationStatement
A SQL statement emitted by a migration plan.
NativeJoin
SchemaMigrationPlan
Additive schema changes planned for a live database.
SqlAdapterRunner
Shared CRUD runner for SQL adapters that can execute raw SQL.
SqlColumnSnapshot
Introspected column metadata used by the pure migration planner.
SqlDeleteOnePlan
Shared single-row delete statement.
SqlFragment
A SQL fragment plus its ordered parameters.
SqlJoinReadStatement
A native join read statement and borrowed metadata needed for row grouping.
SqlParam
A database value paired with the field type needed to bind NULLs correctly.
SqlRateLimitNames
Physical database names used by SQL-backed rate limit stores.
SqlRateLimitPlan
SQL statements used by database-backed rate limit stores.
SqlReadStatement
A read statement and the metadata needed to decode its result rows.
SqlSchemaSnapshot
Introspected database schema used by the pure migration planner.
SqlSelectedField
Field selected by a SQL read statement.
SqlStatement
A complete SQL statement plus its ordered parameters.
SqlTableSnapshot
Introspected table metadata used by the pure migration planner.
TableToCreate
A table missing from the database and planned for creation.

Enums§

DeleteOneStrategy
Dialect strategy used to delete only one matching row.
MigrationStatementKind
The additive operation represented by a migration statement.
SchemaMigrationWarning
Non-executable findings discovered while planning migrations.
SqlDialect
SQL dialect supported by RustAuth’s shared SQL planner.
SqlUpdateOnePlan
Shared single-row update strategy.

Traits§

SqlExecutor
Minimal async execution boundary required by the shared SQL runner.
SqlRowReader
Driver row decoding boundary for converting raw driver rows into RustAuth values.

Functions§

base_alias
consume_sql_rate_limit_record
Applies RustAuth rate-limit semantics to a locked database record.
count_statement
create_returning_selection
create_statement
delete_many_statement
delete_one_statement
ensure_executable_migration_plan
Rejects migration plans that carry non-executable warnings before any schema mutation runs.
execute_schema_migration_plan
Executes a pure migration plan through any SQL executor.
find_many_statement
find_many_with_joins_statement
find_one_statement
internal_base_selection
join_alias
join_field_alias
joined_rows
plan_schema_migration
Compares a target RustAuth schema with a SQL schema snapshot and emits an additive plan.
rate_limit_consume_statements
Builds the dialect-specific statement trio used by SQL-backed rate-limit stores.
rate_limit_count_from_i64
Decodes a persisted rate-limit count, rejecting corrupt negative values instead of wrapping them into a huge u64.
rate_limit_count_to_i64
Encodes an in-memory rate-limit count for SQL BIGINT storage.
resolve_field
resolve_field_from_selection
resolve_native_joins
resolve_table
resolve_table_with_logical
select_fields
select_record
table_has_database_generated_id
update_many_statement
update_one_plan