Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/store-sqlite / connection / OpenConnectionOptions

Interface: OpenConnectionOptions

Defined in: packages/store-sqlite/src/connection.ts:71

Options for openConnection.

Stable

Properties

PropertyModifierTypeDescriptionDefined in
busyTimeoutMs?readonlynumberW-067: how long the driver's busy handler waits for a contended write lock before the operation fails with SqliteBusyError. Applied AFTER the hardening pragmas so the exported WAL_HARDENING_PRAGMAS constant keeps its documented bytes; also honoured on the disableWalHardening / :memory: branch. Default 5000packages/store-sqlite/src/connection.ts:117
cipherLoader?readonly() => Promise<BetterSqlite3Constructor>Internal Optional cipher-driver loader override. When encryption.enabled is true and the operator does not pass driver, this loader is consulted instead of the canonical loadCipherDriver. Used by the test suite to simulate a missing cipher peer without uninstalling the package from the workspace.packages/store-sqlite/src/connection.ts:108
disableWalHardening?readonlybooleanIf true, do not apply the WAL hardening pragmas. The runner still applies foreign_keys=ON and busy_timeout so the migration step works against :memory: databases. Off by default.packages/store-sqlite/src/connection.ts:97
driver?readonlyBetterSqlite3ConstructorOverride the constructor used to open the underlying database. Used by the test suite to inject a stub. When unset the connection lazily loads better-sqlite3 (or the cipher peer when encryption is enabled) at first call.packages/store-sqlite/src/connection.ts:86
encryption?readonlyEncryptionConfigOptional encryption-at-rest configuration. Default: disabled.packages/store-sqlite/src/connection.ts:74
loadVecExtension?readonly(db) => voidOverride the sqlite-vec load(db) helper. Used by the test suite to verify the loader is invoked without a native build.packages/store-sqlite/src/connection.ts:91
pathreadonlystring-packages/store-sqlite/src/connection.ts:72
skipSqliteVec?readonlybooleanIf true, skip loading the sqlite-vec extension. Used by tests that exercise the migration runner without the vector adapter.packages/store-sqlite/src/connection.ts:79