UNPKG

sqlocal

Version:

SQLocal makes it easy to run SQLite3 in the browser, backed by the origin private file system.

20 lines (19 loc) 879 B
import type { DriverConfig, Sqlite3InitModule, Sqlite3StorageType, SQLocalDriver } from '../types.js'; import { SQLiteMemoryDriver } from './sqlite-memory-driver.js'; /** * A SQLocal driver that implements the interface needed for * interacting with SQLite databases in the origin private file system. */ export declare class SQLiteOpfsDriver extends SQLiteMemoryDriver implements SQLocalDriver { readonly storageType: Sqlite3StorageType; constructor(sqlite3InitModule?: Sqlite3InitModule); init(config: DriverConfig): Promise<void>; isDatabasePersisted(): Promise<boolean>; import(database: ArrayBuffer | Uint8Array<ArrayBuffer> | ReadableStream<Uint8Array<ArrayBuffer>>): Promise<void>; export(): Promise<{ name: string; data: ArrayBuffer | Uint8Array<ArrayBuffer>; }>; clear(): Promise<void>; destroy(): Promise<void>; }