Expand description
Phoenix’s stable integration boundary around the Toasty ORM.
Models and queries remain native Toasty types. Phoenix owns connection configuration, backend selection, migrations, and isolated test databases.
Modules§
- sql
- Raw SQL execution helpers. Raw SQL execution helpers for SQL backends.
- stmt
- Typed statement, expression, and query builder types.
Macros§
- create
- Expands struct-literal syntax into create builder method chains. Returns one
or more create builders — call
.exec(&mut db).await?to insert the record(s). - models
- Creates a
ModelSetcontaining the specified models. - query
- Builds a query using the Toasty query language. The macro expands into
the equivalent method-chain calls on the query builder API. It does
not execute the query — chain
.exec(&mut db).await?on the result to run it. - update
- Expands struct-literal syntax into update-builder method chains. Returns
the same builder
target.update()would return — call.exec(&mut db).await?to execute the update.
Structs§
- Database
- A Toasty database handle with Phoenix deployment metadata.
- Database
Builder - Connection and pool configuration shared by SQL backends.
- Deferred
- A field whose value is not loaded by default.
- Migration
- One ordered, reversible database migration.
- Migration
Plan - A read-only description of changes the next command would make.
- Migration
Runner - Executes a validated migration list against one Phoenix database.
- Migration
Status - Persisted migration state read from
phoenix_migrations. - Model
Set - An ordered collection of
Modeldefinitions. - Statement
- A typed wrapper around an untyped
stmt::Statement. - Test
Database - A fresh
SQLitedatabase owned by one test. - Transaction
- An active database transaction.
- Transaction
Builder - Builder for configuring a transaction before starting it.
Enums§
- Backend
- SQL backend selected for this database handle.
- Database
Error - Database setup error with stable Phoenix categories.
- Migration
Error - Migration validation or execution error.
Traits§
- Executor
- Anything that can execute queries —
Db,Connection, orTransaction.
Functions§
- batch
- Compose multiple independent queries into a single batched statement.