Skip to main content

Module pool

Module pool 

Source
Expand description

Database connection pool(s).

Cast supports Postgres, MySQL, and SQLite via per-driver pool variants. The URL scheme determines the driver at connect() time:

  • postgres://... / postgresql://...Driver::Postgres
  • mysql://... / mariadb://...Driver::MySql
  • sqlite://... / sqlite:...Driver::Sqlite

Structs§

Connection
One named connection — a write pool plus zero-or-more read replicas.
ConnectionManager
Resolves named connections — the centerpiece of Cast’s multi-database support.

Enums§

Driver
Which database engine a connection is talking to.
Pool
Driver-tagged pool. Variant tells you which backing sqlx type is live.

Functions§

connect
Connect to a database, dispatching by URL scheme.