Skip to main content

Module db

Module db 

Source

Enums§

DBError

Constants§

DB_POOL

Functions§

admin_database_url
The admin DATABASE_URL the server was configured with.
execute_raw
Runs a multi-statement SQL script against the admin pool via the simple query protocol. Executed against the shared pool reference (not a &mut PgConnection) so the future stays Send/spawnable — the &mut executor form trips a higher-ranked-lifetime bound once boot() is spawned.
get_connection
migrate_db
migrate_url
Runs the full migration set against the database at url. Used by provisioning to bring a freshly-created per-user database up to the (DDL-only) schema.
test_pool_is_set
True when the current thread has installed a test pool. Used by User::get_connection to choose between the test override and the per-user production pool.