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
QueryBuilder
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.
FixedLengthParams
A collection of parameters with a statically known length.
MigrateTypes
Params
A collection of parameters which can be bound to a SQL query.
TransactionMode
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.

Type Aliases§

Db
Query
QueryAs