@arcmantle/sqlite-wrapper
    Preparing search index...

    Class SQLite

    Extended SQLite database class that wraps better-sqlite3 with additional configuration. Automatically enables WAL mode and provides disposable resource management.

    Hierarchy

    • Database
      • SQLite
    Index

    Constructors

    • Creates a new SQLite database instance with WAL mode enabled. WAL (Write-Ahead Logging) mode allows for better concurrency.

      Parameters

      • Optionalfilename: string
      • Optionaloptions: Options

      Returns SQLite

    Properties

    inTransaction: boolean
    memory: boolean
    name: string
    open: boolean
    readonly: boolean
    SqliteError: typeof SqliteErrorClass

    Methods

    • Disposes of the database connection by closing it. This method is called automatically when using the 'using' keyword.

      Returns void

    • Type Parameters

      • T

      Parameters

      • name: string
      • options: RegistrationOptions & {
            inverse?: (total: T, dropped: T) => T;
            result?: (total: T) => unknown;
            start?: T | (() => T);
            step: (total: T, next: ElementOf<T>) => void | T;
        }

      Returns this

    • Parameters

      • destinationFile: string
      • Optionaloptions: BackupOptions

      Returns Promise<BackupMetadata>

    • Returns this

    • Parameters

      • OptionaltoggleState: boolean

      Returns this

    • Parameters

      • source: string

      Returns this

    • Parameters

      • name: string
      • cb: (...params: any[]) => any

      Returns this

    • Parameters

      • name: string
      • options: RegistrationOptions
      • cb: (...params: any[]) => any

      Returns this

    • Parameters

      • path: string

      Returns this

    • Parameters

      • source: string
      • Optionaloptions: PragmaOptions

      Returns unknown

    • Parameters

      • Optionaloptions: SerializeOptions

      Returns Buffer

    • Parameters

      • name: string
      • options: VirtualTableOptions

      Returns this

    • Type Parameters

      • F extends VariableArgFunction

      Parameters

      • fn: F

      Returns Transaction<F>

    • Parameters

      • Optionalunsafe: boolean

      Returns this