@photostructure/sqlite
    Preparing search index...

    Interface SqliteModule

    The main SQLite module interface.

    interface SqliteModule {
        constants: {
            SQLITE_CHANGESET_ABORT: number;
            SQLITE_CHANGESET_CONFLICT: number;
            SQLITE_CHANGESET_CONSTRAINT: number;
            SQLITE_CHANGESET_DATA: number;
            SQLITE_CHANGESET_FOREIGN_KEY: number;
            SQLITE_CHANGESET_NOTFOUND: number;
            SQLITE_CHANGESET_OMIT: number;
            SQLITE_CHANGESET_REPLACE: number;
            SQLITE_OPEN_CREATE: number;
            SQLITE_OPEN_READONLY: number;
            SQLITE_OPEN_READWRITE: number;
        };
        DatabaseSync: new (
            location?: string | Buffer<ArrayBufferLike> | URL,
            options?: DatabaseSyncOptions,
        ) => DatabaseSyncInstance;
        Session: new () => Session;
        StatementSync: new (
            database: DatabaseSyncInstance,
            sql: string,
            options?: StatementOptions,
        ) => StatementSyncInstance;
    }
    Index

    Properties

    constants: {
        SQLITE_CHANGESET_ABORT: number;
        SQLITE_CHANGESET_CONFLICT: number;
        SQLITE_CHANGESET_CONSTRAINT: number;
        SQLITE_CHANGESET_DATA: number;
        SQLITE_CHANGESET_FOREIGN_KEY: number;
        SQLITE_CHANGESET_NOTFOUND: number;
        SQLITE_CHANGESET_OMIT: number;
        SQLITE_CHANGESET_REPLACE: number;
        SQLITE_OPEN_CREATE: number;
        SQLITE_OPEN_READONLY: number;
        SQLITE_OPEN_READWRITE: number;
    }

    SQLite constants for various operations and flags.

    Type declaration

    • SQLITE_CHANGESET_ABORT: number

      Abort on conflict.

    • SQLITE_CHANGESET_CONFLICT: number

      General conflict.

    • SQLITE_CHANGESET_CONSTRAINT: number

      Constraint violation.

    • SQLITE_CHANGESET_DATA: number

      Data conflict type.

    • SQLITE_CHANGESET_FOREIGN_KEY: number

      Foreign key constraint violation.

    • SQLITE_CHANGESET_NOTFOUND: number

      Row not found conflict.

    • SQLITE_CHANGESET_OMIT: number

      Skip conflicting changes.

    • SQLITE_CHANGESET_REPLACE: number

      Replace conflicting changes.

    • SQLITE_OPEN_CREATE: number

      Create database if it doesn't exist.

    • SQLITE_OPEN_READONLY: number

      Open database for reading only.

    • SQLITE_OPEN_READWRITE: number

      Open database for reading and writing.

    DatabaseSync: new (
        location?: string | Buffer<ArrayBufferLike> | URL,
        options?: DatabaseSyncOptions,
    ) => DatabaseSyncInstance

    The DatabaseSync class represents a synchronous connection to a SQLite database. All operations are performed synchronously, blocking until completion.

    Session: new () => Session

    The Session class for recording database changes. This class should not be instantiated directly; use Database.createSession() instead.

    StatementSync: new (
        database: DatabaseSyncInstance,
        sql: string,
        options?: StatementOptions,
    ) => StatementSyncInstance

    The StatementSync class represents a synchronous prepared statement. This class should not be instantiated directly; use Database.prepare() instead.