This adapter uses better-sqlite3 to execute queries against the GeoPackage database

See

https://github.com/JoshuaWise/better-sqlite3|better-sqlite3

Hierarchy

  • SqliteAdapter

Implements

Constructors

Properties

db: any
filePath: string | Buffer | Uint8Array

Methods

  • Gets all results from the statement in an array

    See

    all

    Returns

    Parameters

    • sql: string

      statement to run

    • Optional params: Record<string, DBValue> | []

      bind parameters

    Returns Record<string, DBValue>[]

  • Runs an insert statement with the parameters provided

    Returns

    last inserted row id

    Parameters

    • statement: any

      statement to run

    • Optional params: Record<string, DBValue> | []

      bind parameters

    Returns number

  • Counts rows that match the query

    Returns

    count

    Parameters

    • tableName: string

      table name from which to count

    • Optional where: string

      where clause

    • Optional whereArgs: Record<string, DBValue> | []

      where args

    Returns number

  • Runs the specified delete statement and returns the number of deleted rows

    Returns

    deleted rows

    Parameters

    • sql: string

      statement to run

    • Optional params: Record<string, DBValue> | []

      bind parameters

    Returns number

  • Returns an Iterable with results from the query

    See

    iterate

    Returns

    Parameters

    • sql: string

      statement to run

    • Optional params: Record<string, DBValue> | []

      bind parameters

    Returns IterableIterator<Record<string, DBValue>>

  • Runs the specified insert statement and returns the last inserted id or undefined if no insert happened

    Returns

    last inserted row id

    Parameters

    • sql: string

      statement to run

    • Optional params: Record<string, DBValue> | []

      bind parameters

    Returns number

Generated using TypeDoc