Expand description
Database connection helpers and SQLite reader/writer pool setup.
The module wraps SeaORM connection creation with retry behavior, optional metrics callbacks, and SQLite-specific pooling rules. SQLite writer connections are constrained so transaction serialization is explicit, while read-only handles can still be split out when the URL supports it.
Structs§
- Database
Config - Database connection configuration.
- DbHandles
- Pair of writer and reader database handles.
Functions§
- connect
- Connects to the configured database without metrics.
- connect_
reader_ for_ writer - Creates reader/writer handles for an existing writer connection without metrics.
- connect_
reader_ for_ writer_ with_ metrics - Creates reader/writer handles for an existing writer connection and metrics recorder.
- connect_
with_ metrics - Connects to the configured database and installs a metrics callback.