Expand description
Parameterized SQL lowering shared by the three relational backend adapters. Connection, isolation, error mapping, and migration execution remain with the SQLite, PostgreSQL, and MySQL adapter crates.
Structsยง
- Builder ๐
- Reservation
Statements - Prepared statements for one reservation decision under a backend transaction.
- Statement
- One safely parameterized statement; values never enter its SQL text.
Enumsยง
- Dialect
- The physical placeholder and identifier convention selected by an adapter.
Functionsยง
- adoption_
cursor - Extracts the next stable identity cursor from a bounded adoption page.
- column
- Produces one physical column declaration without accepting raw SQL.
- compile_
aggregate - Compiles one count, sum, minimum, or maximum over declared fields.
- compile_
claim_ select - Compiles an ordered, one-record claim selection with backend row locking.
- compile_
delete_ effects - Keeps JSON relationship values synchronized when native constraints null their keys. The caller executes these bounded statements in the same transaction as deletion.
- compile_
detached_ delete_ effects - Lowers referential delete actions when an adapter temporarily detaches native constraints. Descendants are removed before their parents; the adapter verifies restrictive references before committing. Every predicate retains the ordinary typed parameter bindings.
- compile_
ensured_ identity_ query - Looks up the identity of an inserted or pre-existing unique record inside the same transaction. The caller must hold its transaction until this read.
- compile_
mutation - Compiles one validated transaction step against previous generated IDs.
- compile_
query - Compiles one bounded logical query to parameterized SQL.
- compile_
reservation - compile_
schema_ change - Compiles one additive logical migration step into SQL statements. The executing adapter must guard these statements with its migration ledger.
- conditional_
index ๐ - Compiles one declared conditional or case-folded index.
- current_
timestamp_ sql - Keeps generated timestamps consistent in inserts, schema defaults and backfills.
- ddl_
field_ ๐literal - ddl_
filter ๐ - Encodes a schema-owned partial-index condition without request interpolation.
- ddl_
literal ๐ - Encodes a schema-owned literal in DDL; request values never use this path.
- derived_
adoption_ query - Builds an ordered, bounded migration page for expression-key adoption.
- derived_
adoption_ statements - Repairs expression keys from a locked migration page without changing original values.
- derived_
column - Declares a nullable physical key whose Unicode mapping is owned by Rust.
- derived_
field - Describes a protected comparison column for creation and interrupted-DDL verification.
- expression_
index ๐ - Lowers an index with an explicit physical encoding; runtime writes use protected keys.
- field_
copy_ query - Selects one bounded page for a typed field-copy migration.
- field_
copy_ statements - Uses ordinary typed mutation lowering for historical copy values and derived keys.
- field_
default_ sql - Lowers one declared default for schema creation and physical storage adoption.
- foreign_
key_ ๐clause - Emits a MySQL table constraint because inline REFERENCES does not enforce it.
- previous_
expression_ index - Describes the retired native-lowercase encoding solely for validated storage adoption.
- record_
values - Resolves logical record fields to safe SQL bind values before import.
- resolve_
value ๐ - Resolves a transaction-local value from a previous insert result.
- sql_
type - Maps a logical field to one backend-specific physical scalar type. Returns the physical field declaration used by schema creation and catalog verification.