Options
All
  • Public
  • Public/Protected
  • All
Menu

@jackdbd/sqlite-utils

A few functions useful when working with better-sqlite3.

Index

Variables

DEPRECATED_PRAGMAS: string[] = ...

Complete list of deprecated SQLite PRAGMA statements.

see

PRAGMA Statements - sqlite.org

PRAGMAS: string[] = ...

Complete list of non-deprecated SQLite PRAGMA statements.

see

PRAGMA Statements - sqlite.org

Functions

  • foreignKeys(db: Database, table_name: string): ForeignKey[]
  • Returns an array of all the foreign key constraints of the requested table.

    Parameters

    • db: Database
    • table_name: string

    Returns ForeignKey[]

  • pragmaDict(db: Database): {}
  • Returns a dictionary of the available PRAGMA statements in this SQLite database, where each key-value pair is a PRAGMA with its associated value.

    PRAGMA statements not available in the provided SQLite database will not show up in the dictionary.

    see

    PRAGMA Statements - sqlite.org

    Parameters

    • db: Database

    Returns {}

    • [pragma: string]: any
  • tableInfo(db: Database, table_name: string): ColumnInfo[]
  • Returns an array where each item is a piece of information about a column of the requested table.

    Parameters

    • db: Database
    • table_name: string

    Returns ColumnInfo[]

Generated using TypeDoc