API Reference
sqliteBackend()
Optional Node SQLite byte backend (D106 passive storage).
Uses node:sqlite when the current Node runtime provides it; otherwise throws a clear runtime error at construction time. The caller owns close().
Import
import { sqliteBackend } from "@graphrefly/ts/storage/node";
Signature
function sqliteBackend(
path: string,
opts: SqliteBackendOptions = {},
): ClosableStorageBackend
Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | path value used by the helper. |
opts | SqliteBackendOptions | Options that configure the helper. |
Returns
A ClosableStorageBackend value.
Example
import { sqliteBackend } from "@graphrefly/ts/storage/node";
Source
packages/ts/src/storage/node.ts