SyncSqliteDatabase

See source code
Table of contents

Minimal interface for a synchronous SQLite database.

This interface is compatible with: - node:sqlite DatabaseSync (Node.js 22.5+) - better-sqlite3 Database

Any SQLite library that provides synchronous exec and prepare methods with the signatures below can be used with NodeSqliteWrapper.

interface SyncSqliteDatabase {}

Methods

exec

Execute raw SQL without returning results

Parameters

NameDescription

sql

string;

Returns

void;

prepare

Prepare a statement for execution

Parameters

NameDescription

sql

string;

Returns

{
  all(...params: unknown[]): unknown[];
  iterate(...params: unknown[]): IterableIterator<unknown>;
  run(...params: unknown[]): unknown;
};

Prev
SessionStateSnapshot
Next
TLPersistentClientSocket