type
Config
Bounded connection behavior for the embedded SQLite store.
Properties
| Property | Type | Description |
|---|---|---|
Path | string | Path is a filesystem path, a file: SQLite URI, or :memory:. |
BusyTimeout | time.Duration | BusyTimeout bounds how long SQLite waits for another writer. Zero selects ten seconds. Negative values and values above SQLite's signed 32-bit millisecond limit are rejected. |
DisableWAL | bool | DisableWAL keeps file databases in their existing journal mode. WAL is enabled by default because it permits readers while the single writer is active. SQLite memory databases ignore WAL mode. |
MaxConnections | int | MaxConnections bounds pooled readers. Operation transactions still use BEGIN IMMEDIATE and SQLite's single-writer contract. |
How it works
Zero values select safe local defaults. File databases enable WAL unless DisableWAL is set; SQLite still has one writer.
Full signature
type Config struct {
// Path is a filesystem path, a file: SQLite URI, or :memory:.
Path string
// BusyTimeout bounds how long SQLite waits for another writer. Zero selects
// ten seconds. Negative values and values above SQLite's signed 32-bit
// millisecond limit are rejected.
BusyTimeout time.Duration
// DisableWAL keeps file databases in their existing journal mode. WAL is
// enabled by default because it permits readers while the single writer is
// active. SQLite memory databases ignore WAL mode.
DisableWAL bool
// MaxConnections bounds pooled readers. Operation transactions still use
// BEGIN IMMEDIATE and SQLite's single-writer contract.
MaxConnections int
}