Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

constructor

  • new SnapDBAdapter(snapDBArgs?: undefined | object): SnapDBAdapter

Properties

_ai

_ai: object

Type declaration

  • [tableName: string]: number

_baseFolder

_baseFolder: string

_id

_id: string

_path

_path: string = typeof process !== "undefined" ? process.cwd() : ""

_tableConfigs

_tableConfigs: object

Type declaration

_tables

_tables: object

Type declaration

  • [tableName: string]: SnapDB<any>

Optional assign

assign: undefined | false | true

nSQL

Optional snapDBArgs

snapDBArgs: undefined | object

Optional useCache

useCache: undefined | false | true

Methods

addIndexValue

  • addIndexValue(tableId: string, index: string, key: any, value: any, complete: function, error: function): void

batch

  • batch(table: string, actions: object[], success: function, error: function): void
  • Parameters

    • table: string
    • actions: object[]
    • success: function
        • (result: any[]): void
        • Parameters

          • result: any[]

          Returns void

    • error: function
        • (msg: any): void
        • Parameters

          • msg: any

          Returns void

    Returns void

connect

  • connect(id: string, complete: function, error: function): void

createIndex

  • createIndex(tableId: string, index: string, type: string, complete: function, error: function): void

createTable

  • createTable(tableName: string, tableData: InanoSQLTable, complete: function, error: function): void

delete

  • delete(table: string, pk: any, complete: function, error: function): void

deleteIndex

  • deleteIndex(tableId: string, index: string, complete: function, error: function): void

deleteIndexValue

  • deleteIndexValue(tableId: string, index: string, key: any, value: any, complete: function, error: function): void

disconnect

  • disconnect(complete: function, error: function): void

dropTable

  • dropTable(tableName: string, complete: function, error: function): void

getTableIndex

  • getTableIndex(table: string, complete: function, error: function): void

getTableIndexLength

  • getTableIndexLength(table: string, complete: function, error: function): void

read

  • read(table: string, pk: any, complete: function, error: function): void
  • Parameters

    • table: string
    • pk: any
    • complete: function
        • (row: object | undefined): void
        • Parameters

          • row: object | undefined

          Returns void

    • error: function
        • (err: any): void
        • Parameters

          • err: any

          Returns void

    Returns void

readIndexKey

  • readIndexKey(tableId: string, index: string, pk: any, onRowPK: function, complete: function, error: function): void
  • Parameters

    • tableId: string
    • index: string
    • pk: any
    • onRowPK: function
        • (pk: any): void
        • Parameters

          • pk: any

          Returns void

    • complete: function
        • (): void
        • Returns void

    • error: function
        • (err: any): void
        • Parameters

          • err: any

          Returns void

    Returns void

readIndexKeys

  • readIndexKeys(tableId: string, index: string, type: "range" | "offset" | "all", offsetOrLow: any, limitOrHigh: any, reverse: boolean, onRowPK: function, complete: function, error: function): void
  • Parameters

    • tableId: string
    • index: string
    • type: "range" | "offset" | "all"
    • offsetOrLow: any
    • limitOrHigh: any
    • reverse: boolean
    • onRowPK: function
        • (key: any, id: any): void
        • Parameters

          • key: any
          • id: any

          Returns void

    • complete: function
        • (): void
        • Returns void

    • error: function
        • (err: any): void
        • Parameters

          • err: any

          Returns void

    Returns void

readMulti

  • readMulti(table: string, type: "range" | "offset" | "all", offsetOrLow: any, limitOrHigh: any, reverse: boolean, onRow: function, complete: function, error: function): void
  • Parameters

    • table: string
    • type: "range" | "offset" | "all"
    • offsetOrLow: any
    • limitOrHigh: any
    • reverse: boolean
    • onRow: function
        • (row: object, i: number): void
        • Parameters

          • row: object
            • [key: string]: any
          • i: number

          Returns void

    • complete: function
        • (): void
        • Returns void

    • error: function
        • (err: any): void
        • Parameters

          • err: any

          Returns void

    Returns void

write

  • write(table: string, pk: any, row: object, complete: function, error: function): void
  • Parameters

    • table: string
    • pk: any
    • row: object
      • [key: string]: any
    • complete: function
        • (pk: any): void
        • Parameters

          • pk: any

          Returns void

    • error: function
        • (err: any): void
        • Parameters

          • err: any

          Returns void

    Returns void

Object literals

plugin

plugin: object

filters

filters: object[] = [{name: "config",priority: 1000,call: (inputArgs: configFilter, complete, cancel) => {if (inputArgs.res.path && inputArgs.res.path.length) {this._path = inputArgs.res.path;}complete(inputArgs);}}]

name

name: string = "SnapDB Adapter"

version

version: number = VERSION

Generated using TypeDoc