@types/better-sqlite3

  • Version 7.6.2
  • Published
  • 9.35 kB
  • 1 dependency
  • MIT license

Install

npm i @types/better-sqlite3
yarn add @types/better-sqlite3
pnpm add @types/better-sqlite3

Overview

TypeScript definitions for better-sqlite3

Index

Variables

variable Database

const Database: BetterSqlite3.DatabaseConstructor;

    Interfaces

    interface AggregateOptions

    interface AggregateOptions extends RegistrationOptions {}

      property inverse

      inverse?: ((total: any, dropped: any) => any) | undefined;

        property result

        result?: ((total: any) => any) | undefined;

          property start

          start?: any;

            property step

            step: (total: any, next: any) => any;

              interface BackupMetadata

              interface BackupMetadata {}

                property remainingPages

                remainingPages: number;

                  property totalPages

                  totalPages: number;

                    interface BackupOptions

                    interface BackupOptions {}

                      property progress

                      progress: (info: BackupMetadata) => number;

                        interface Options

                        interface Options {}

                          property fileMustExist

                          fileMustExist?: boolean | undefined;

                            property nativeBinding

                            nativeBinding?: string | undefined;

                              property readonly

                              readonly?: boolean | undefined;

                                property timeout

                                timeout?: number | undefined;

                                  property verbose

                                  verbose?: ((message?: any, ...additionalArgs: any[]) => void) | undefined;

                                    interface PragmaOptions

                                    interface PragmaOptions {}

                                      property simple

                                      simple?: boolean | undefined;

                                        interface RegistrationOptions

                                        interface RegistrationOptions {}

                                          property deterministic

                                          deterministic?: boolean | undefined;

                                            property directOnly

                                            directOnly?: boolean | undefined;

                                              property safeIntegers

                                              safeIntegers?: boolean | undefined;

                                                property varargs

                                                varargs?: boolean | undefined;

                                                  interface RunResult

                                                  interface RunResult {}

                                                    property changes

                                                    changes: number;

                                                      property lastInsertRowid

                                                      lastInsertRowid: number | bigint;

                                                        interface SerializeOptions

                                                        interface SerializeOptions {}

                                                          property attached

                                                          attached?: string;

                                                            Type Aliases

                                                            type ColumnDefinition

                                                            type ColumnDefinition = BetterSqlite3.ColumnDefinition;

                                                              type Database

                                                              type Database = BetterSqlite3.Database;

                                                                type SqliteError

                                                                type SqliteError = typeof SqliteError;

                                                                  type Statement

                                                                  type Statement<BindParameters extends any[] | {} = any[]> =
                                                                  BindParameters extends any[]
                                                                  ? BetterSqlite3.Statement<BindParameters>
                                                                  : BetterSqlite3.Statement<[BindParameters]>;

                                                                    type Transaction

                                                                    type Transaction<T extends VariableArgFunction = VariableArgFunction> =
                                                                    BetterSqlite3.Transaction<T>;

                                                                      Namespaces

                                                                      namespace BetterSqlite3

                                                                      namespace BetterSqlite3 {}

                                                                        interface ColumnDefinition

                                                                        interface ColumnDefinition {}

                                                                          property column

                                                                          column: string | null;

                                                                            property database

                                                                            database: string | null;

                                                                              property name

                                                                              name: string;

                                                                                property table

                                                                                table: string | null;

                                                                                  property type

                                                                                  type: string | null;

                                                                                    interface Database

                                                                                    interface Database {}

                                                                                      property inTransaction

                                                                                      inTransaction: boolean;

                                                                                        property memory

                                                                                        memory: boolean;

                                                                                          property name

                                                                                          name: string;

                                                                                            property open

                                                                                            open: boolean;

                                                                                              property readonly

                                                                                              readonly: boolean;

                                                                                                method aggregate

                                                                                                aggregate: (name: string, options: Database.AggregateOptions) => this;

                                                                                                  method backup

                                                                                                  backup: (
                                                                                                  destinationFile: string,
                                                                                                  options?: Database.BackupOptions
                                                                                                  ) => Promise<Database.BackupMetadata>;

                                                                                                    method close

                                                                                                    close: () => this;

                                                                                                      method defaultSafeIntegers

                                                                                                      defaultSafeIntegers: (toggleState?: boolean) => this;

                                                                                                        method exec

                                                                                                        exec: (source: string) => this;

                                                                                                          method function

                                                                                                          function: {
                                                                                                          (name: string, cb: (...params: any[]) => any): this;
                                                                                                          (
                                                                                                          name: string,
                                                                                                          options: Database.RegistrationOptions,
                                                                                                          cb: (...params: any[]) => any
                                                                                                          ): this;
                                                                                                          };

                                                                                                            method loadExtension

                                                                                                            loadExtension: (path: string) => this;

                                                                                                              method pragma

                                                                                                              pragma: (source: string, options?: Database.PragmaOptions) => any;

                                                                                                                method prepare

                                                                                                                prepare: <BindParameters extends {} | any[] = any[]>(
                                                                                                                source: string
                                                                                                                ) => BindParameters extends any[]
                                                                                                                ? Statement<BindParameters>
                                                                                                                : Statement<[BindParameters]>;

                                                                                                                  method serialize

                                                                                                                  serialize: (options?: Database.SerializeOptions) => Buffer;

                                                                                                                    method table

                                                                                                                    table: (name: string, options: VirtualTableOptions) => this;

                                                                                                                      method transaction

                                                                                                                      transaction: <F extends VariableArgFunction>(fn: F) => Transaction<F>;

                                                                                                                        method unsafeMode

                                                                                                                        unsafeMode: (unsafe?: boolean) => this;

                                                                                                                          interface DatabaseConstructor

                                                                                                                          interface DatabaseConstructor {}

                                                                                                                            property prototype

                                                                                                                            prototype: Database;

                                                                                                                              property SqliteError

                                                                                                                              SqliteError: typeof SqliteError;

                                                                                                                                construct signature

                                                                                                                                new (filename: string | Buffer, options?: Database.Options): Database;

                                                                                                                                  call signature

                                                                                                                                  (filename: string, options?: Database.Options): Database;

                                                                                                                                    interface Statement

                                                                                                                                    interface Statement<BindParameters extends any[]> {}

                                                                                                                                      property busy

                                                                                                                                      busy: boolean;

                                                                                                                                        property database

                                                                                                                                        database: Database;

                                                                                                                                          property reader

                                                                                                                                          reader: boolean;

                                                                                                                                            property source

                                                                                                                                            source: string;

                                                                                                                                              method all

                                                                                                                                              all: (...params: BindParameters) => any[];

                                                                                                                                                method bind

                                                                                                                                                bind: (...params: BindParameters) => this;

                                                                                                                                                  method columns

                                                                                                                                                  columns: () => ColumnDefinition[];

                                                                                                                                                    method expand

                                                                                                                                                    expand: (toggleState?: boolean) => this;

                                                                                                                                                      method get

                                                                                                                                                      get: (...params: BindParameters) => any;

                                                                                                                                                        method iterate

                                                                                                                                                        iterate: (...params: BindParameters) => IterableIterator<any>;

                                                                                                                                                          method pluck

                                                                                                                                                          pluck: (toggleState?: boolean) => this;

                                                                                                                                                            method raw

                                                                                                                                                            raw: (toggleState?: boolean) => this;

                                                                                                                                                              method run

                                                                                                                                                              run: (...params: BindParameters) => Database.RunResult;

                                                                                                                                                                method safeIntegers

                                                                                                                                                                safeIntegers: (toggleState?: boolean) => this;

                                                                                                                                                                  interface Transaction

                                                                                                                                                                  interface Transaction<F extends VariableArgFunction> {}

                                                                                                                                                                    method default

                                                                                                                                                                    default: (...params: ArgumentTypes<F>) => ReturnType<F>;

                                                                                                                                                                      method deferred

                                                                                                                                                                      deferred: (...params: ArgumentTypes<F>) => ReturnType<F>;

                                                                                                                                                                        method exclusive

                                                                                                                                                                        exclusive: (...params: ArgumentTypes<F>) => ReturnType<F>;

                                                                                                                                                                          method immediate

                                                                                                                                                                          immediate: (...params: ArgumentTypes<F>) => ReturnType<F>;

                                                                                                                                                                            call signature

                                                                                                                                                                            (...params: ArgumentTypes<F>): ReturnType<F>;

                                                                                                                                                                              interface VirtualTableOptions

                                                                                                                                                                              interface VirtualTableOptions {}

                                                                                                                                                                                property columns

                                                                                                                                                                                columns: string[];

                                                                                                                                                                                  property directOnly

                                                                                                                                                                                  directOnly?: boolean | undefined;

                                                                                                                                                                                    property parameters

                                                                                                                                                                                    parameters?: string[] | undefined;

                                                                                                                                                                                      property rows

                                                                                                                                                                                      rows: () => Generator;

                                                                                                                                                                                        property safeIntegers

                                                                                                                                                                                        safeIntegers?: boolean | undefined;

                                                                                                                                                                                          Package Files (1)

                                                                                                                                                                                          Dependencies (1)

                                                                                                                                                                                          Dev Dependencies (0)

                                                                                                                                                                                          No dev dependencies.

                                                                                                                                                                                          Peer Dependencies (0)

                                                                                                                                                                                          No peer dependencies.

                                                                                                                                                                                          Badge

                                                                                                                                                                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/better-sqlite3.

                                                                                                                                                                                          • Markdown
                                                                                                                                                                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/better-sqlite3)
                                                                                                                                                                                          • HTML
                                                                                                                                                                                            <a href="https://www.jsdocs.io/package/@types/better-sqlite3"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>