export type SqliteValue = null | string | number | bigint | ArrayBuffer; export type SqliteInValue = SqliteValue | boolean | Date | Uint8Array; export type SqliteInArgs = SqliteInValue[] | Record; export interface SqliteStatement { sql: string; args?: SqliteInArgs; } export interface SqliteResultSet { columns: string[]; columnTypes: string[]; rows: Array>; rowsAffected: number; lastInsertRowid?: bigint; } export type SqliteTransactionMode = 'write' | 'read' | 'deferred'; export interface SqliteTransaction { execute(statement: string | SqliteStatement): Promise; commit(): Promise; rollback(): Promise; close(): void; readonly closed: boolean; } export interface SqliteClient { execute(statement: string | SqliteStatement): Promise; batch(statements: Array, mode?: SqliteTransactionMode): Promise; transaction(mode?: SqliteTransactionMode): Promise; close(): void | Promise; /** Pulls the primary's changes into an embedded replica. */ sync?(): Promise; readonly closed: boolean; readonly protocol: string; }