An abstract interface for a SQLite database.

Roughly based on better-sqlite3's Database class, (which can be used as-is), but only with the methods that are used by mtcute.

interface ISqliteDatabase {
    close: (() => void);
    exec: ((sql: string) => void);
    prepare: (<BindParameters>(sql: string) => ISqliteStatement<BindParameters>);
    transaction: (<F>(fn: F) => F);
}

Properties

close: (() => void)
exec: ((sql: string) => void)
prepare: (<BindParameters>(sql: string) => ISqliteStatement<BindParameters>)
transaction: (<F>(fn: F) => F)