Re-exports§
pub extern crate sqlx;
Modules§
- db 🔒
- migrate 🔒
- queries 🔒
- Immutable query functionality of a SQL database.
- syntax_
helpers - transaction 🔒
- SQL transactions
Macros§
- include_
dir - Embed the contents of a directory in your crate.
- include_
migrations - Embed migrations from the given directory into the current binary for PostgreSQL or SQLite.
Structs§
- Config
- Error
- The
Error
type, a wrapper around a dynamic error type. - Migration
- Represents a schema migration to be run on the database,
this struct is used by the
embed_migrations!
macro to gather migration files and shouldn’t be needed by the user - Pruner
- Query
Builder - Helper type for programmatically constructing queries.
- Read
- Marker type indicating a transaction with read-only access to the database.
- SqlStorage
- Storage for the APIs provided in this crate, backed by a remote PostgreSQL database.
- Sqlite
- Sqlite database driver.
- Transaction
- An atomic SQL transaction.
- Write
- Marker type indicating a transaction with read-write access to the database.
Traits§
- Database
- A database driver.
- Executor
- A type that contains or can provide a database connection to use for executing queries against the database.
- Fixed
Length Params - A collection of parameters with a statically known length.
- Migrate
Types - Params
- A collection of parameters which can be bound to a SQL query.
- Transaction
Mode - Trait for marker types indicating what type of access a transaction has to the database.
Functions§
- add_
custom_ 🔒migrations - Add custom migrations to a default migration sequence.
- build_
where_ in - default_
migrations - The migrations required to build the default schema for this version of
SqlStorage
. - query
- query_
as - validate_
migrations 🔒 - Validate and preprocess a sequence of migrations.