Expand description
Top-level Database handle that owns the read provider, an optional
write provider and an optional session provider, and exposes the query and
transaction surface.
The session provider exists for features that need a Postgres session of
their own rather than a transaction: LISTEN, session advisory locks (the
replica-identity claim, scheduler job locks, the migration lock) and the
migration runner. Pointing database_session_url straight at Postgres
lets database_url/database_write_url go through a transaction-mode
pooler such as PgBouncer. Without it, Database::session is the write
provider.
Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.