Expand description
Connection pool for SQLite.
This module provides an optimized connection pool for SQLite databases. Unlike PostgreSQL/MySQL, SQLite has unique characteristics:
- In-memory databases: Each connection has its own isolated database
- File-based databases: Connections share the same database file
In-memory caveat: because every in-memory connection is its own
isolated database, an in-memory pool isolates every statement on its
own database. Use transaction() to pin a single connection, or a
tempfile/shared-cache URI, for multi-statement workflows.
For file-based databases, this pool reuses connections to avoid the overhead of opening new connections (~200µs per open).
Structs§
- Pool
Config - Configuration for the connection pool.
- Pool
Stats - Statistics about pool usage.
- Sqlite
Pool - A connection pool for SQLite.
- Sqlite
Pool Builder - Builder for creating a connection pool.