@photostructure/sqlite
    Preparing search index...

    Interface DatabaseSyncOptions

    Configuration options for opening a database. This interface matches Node.js sqlite module's DatabaseSyncOptions.

    interface DatabaseSyncOptions {
        allowBareNamedParameters?: boolean;
        allowExtension?: boolean;
        allowUnknownNamedParameters?: boolean;
        defensive?: boolean;
        enableDoubleQuotedStringLiterals?: boolean;
        enableForeignKeyConstraints?: boolean;
        location?: string;
        open?: boolean;
        readBigInts?: boolean;
        readOnly?: boolean;
        returnArrays?: boolean;
        timeout?: number;
    }
    Index

    Properties

    allowBareNamedParameters?: boolean

    If true, allows binding named parameters without the prefix character. For example, allows using 'foo' instead of ':foo' or '$foo'.

    true
    
    allowExtension?: boolean

    If true, enables loading of SQLite extensions.

    false
    
    allowUnknownNamedParameters?: boolean

    If true, unknown named parameters are ignored during binding. If false, an exception is thrown for unknown named parameters.

    false
    
    defensive?: boolean

    If true, enables the defensive flag. When the defensive flag is enabled, language features that allow ordinary SQL to deliberately corrupt the database file are disabled. The defensive flag can also be set using enableDefensive().

    enableDoubleQuotedStringLiterals?: boolean

    If true, double-quoted string literals are allowed.

    If enabled, double quotes can be misinterpreted as identifiers instead of string literals, leading to confusing errors.

    The SQLite documentation strongly recommends avoiding double-quoted strings entirely.

    enableForeignKeyConstraints?: boolean

    If true, foreign key constraints are enforced.

    true
    
    location?: string

    Path to the database file. Use ':memory:' for an in-memory database.

    open?: boolean

    If true, the database is opened immediately. If false, the database is not opened until the first operation.

    true
    
    readBigInts?: boolean

    If true, SQLite integers are returned as JavaScript BigInt values. If false, integers are returned as JavaScript numbers.

    false
    
    readOnly?: boolean

    If true, the database is opened in read-only mode.

    false
    
    returnArrays?: boolean

    If true, query results are returned as arrays instead of objects.

    false
    
    timeout?: number

    Sets the busy timeout in milliseconds.

    0