Skip to content
PACKAGES

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 { sqliteBackend } from "@graphrefly/ts/storage/node";
function sqliteBackend(
path: string,
opts: SqliteBackendOptions = {},
): ClosableStorageBackend
ParameterTypeDescription
pathstringpath value used by the helper.
optsSqliteBackendOptionsOptions that configure the helper.

A ClosableStorageBackend value.

import { sqliteBackend } from "@graphrefly/ts/storage/node";

packages/ts/src/storage/node.ts