type

Config

Bounded connection behavior for the embedded SQLite store.

Properties

PropertyTypeDescription
PathstringPath is a filesystem path, a file: SQLite URI, or :memory:.
BusyTimeouttime.DurationBusyTimeout 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.
DisableWALboolDisableWAL 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.
MaxConnectionsintMaxConnections 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 }

Source adapters/sqlite/sqlite.go:36