Expand description
SQLx integration re-exports, gated behind the default sqlx feature or
one of its engines, sqlx-sqlite and sqlx-postgres.
Modules§
- __
private_ core - Alibi Core
- additional_
fields - Raw configured values staged on actual model columns.
- hooks
SQLxbindings for the shared database lifecycle hooks.- json_
metadata - JSON metadata storage for bundled and application-owned
SQLxmodels. - model
- Column-level write staging for
SQLxmodels. - organization_
models - Application-owned organization plugin tables. Models derive
crate::SqlxModeland use Rust names for plugin fields, withsqlx(rename)for physical names. - pool
- Engine-tagged
SQLxpools and transactions, and statement execution. - rate_
limit - Atomic rolling rate limits persisted independently of an application’s auth schema.
- schema
SQLxmodel bindings for Alibi schemas.- sqlx
- The async SQL toolkit for Rust, built with ❤️ by the LaunchBadge team.
- store
SQLx-backed persistence implementation for built-in auth tables.- value
- Typed SQL values bound to
SQLxarguments.
Structs§
- Active
Row - Per-column write state of one model row, in model column order.
- Column
Def - A physical model column.
- Json
Metadata - JSON storage preserving every application object key.
- Organization
Models - Bind the three organization entities to application models and ID factories. This affects every plugin operation, including invitation transactions.
- Sqlx
Backend - The
SQLxhook backend: implementDatabaseHooks<S, SqlxBackend>to receive its pool and transaction. - Sqlx
Rate Limit Storage - Shared database storage. Run
SchemaMigrator::migratebefore serving requests; ordinary auth migrations do not create or claim its table. Compare-and-swap predicates preserve quotas across independent application instances. - Sqlx
Store - Sqlx
Transaction - An auth transaction shared with lifecycle hooks.
- Sqlx
Transaction Guard - Exclusive access to an open auth transaction.
Enums§
- Active
Value - One column’s write state.
- Column
Kind - Storage category of a model column, derived from its Rust field type.
- Engine
- The database engine behind a pool.
- Hook
Control - Control flow returned by database
before_*hooks. - SqlValue
- A typed value bound to one SQL parameter.
- Sqlx
Pool - An application’s
SQLxpool. Better Auth shares it with the application.
Traits§
- Database
Hooks - Lifecycle hooks for intercepting auth writes.
- Sqlx
Account Model - Sqlx
Model - A table-backed
SQLxmodel. - SqlxRow
- A model decodable from the rows of every enabled engine.
- Sqlx
Session Model - Sqlx
User Model - Sqlx
Value - A model field type which converts to and from a bound
SqlValue. - Sqlx
Verification Model
Functions§
Type Aliases§
- Sqlx
Hook Context - Context passed to
SQLxlifecycle hooks.
Derive Macros§
- Auth
Entity - Derive macro that generates
Auth*trait impls andSqlx*Modelimpls for aSQLxmodel. - Sqlx
Model - Derive macro that implements
SqlxModelfor a table-backed row type.