Options
All
  • Public
  • Public/Protected
  • All
Menu

Class _nanoSQLQuery

Hierarchy

  • _nanoSQLQuery

Implements

Index

Constructors

constructor

  • Parameters

    • databaseID: string | undefined
    • nSQL: InanoSQLInstance
    • query: InanoSQLQuery
    • progress: function
        • (row: any, i: number): void
        • Parameters

          • row: any
          • i: number

          Returns void

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

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

          • err: any

          Returns void

    Returns _nanoSQLQuery

Properties

_didRangeAlready

_didRangeAlready: boolean

_groupBy

_groupBy: InanoSQLSortBy

_groupByColumns

_groupByColumns: string[]

_hasAggrFn

_hasAggrFn: boolean

_hasFn

_hasFn: boolean

_havingArgs

_havingArgs: IWhereArgs

_idxOrderBy

_idxOrderBy: boolean = false

_indexesUsed

_indexesUsed: string[]

_orderBy

_orderBy: InanoSQLSortBy

_pkOrderBy

_pkOrderBy: boolean = false

_queryBuffer

_queryBuffer: any[] = []

_selectArgs

_selectArgs: ISelectArgs[] = []

_sortGroupKeys

_sortGroupKeys: object

Type declaration

  • [groupKey: string]: number

_sortGroups

_sortGroups: any[][] = []

_stream

_stream: boolean = true

_whereArgs

_whereArgs: IWhereArgs

complete

complete: function

Type declaration

    • (): void
    • Returns void

databaseID

databaseID: string | undefined

error

error: function

Type declaration

    • (err: any): void
    • Parameters

      • err: any

      Returns void

nSQL

progress

progress: function

Type declaration

    • (row: any, i: number): void
    • Parameters

      • row: any
      • i: number

      Returns void

query

upsertPath

upsertPath: string[]

Static _selectArgsMemoized

_selectArgsMemoized: object

Type declaration

  • [key: string]: object
    • args: ISelectArgs[]
    • hasAggrFn: boolean
    • hasFn: boolean

Static _sortMemoized

_sortMemoized: object

Type declaration

Static _whereMemoized

_whereMemoized: object

Type declaration

Static likeCache

likeCache: object

Type declaration

  • [likeQuery: string]: RegExp

Methods

_buildCombineWhereJoin

  • _buildCombineWhereJoin(graphWhere: any, graphTable: string, rowData: any): any
  • Parameters

    • graphWhere: any
    • graphTable: string
    • rowData: any

    Returns any

_clone

  • _clone(progress: function, finished: function, error: function): void
  • Parameters

    • progress: function
        • (row: any, i: number): void
        • Parameters

          • row: any
          • i: number

          Returns void

    • finished: function
        • (): void
        • Returns void

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

          • err: any

          Returns void

    Returns void

_combineRows

  • _combineRows(rData: any): object

_compare

  • Compare function used by WHERE to determine if a given value matches a given condition.

    Accepts single where arguments (compound arguments not handled).

    Parameters

    Returns boolean

_conform

  • _conform(progress: function, finished: function, error: function): void
  • Parameters

    • progress: function
        • (row: any, i: number): void
        • Parameters

          • row: any
          • i: number

          Returns void

    • finished: function
        • (): void
        • Returns void

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

          • err: any

          Returns void

    Returns void

_createTable

  • _createTable(table: InanoSQLTableConfig, alterTable: boolean, onRow: function, complete: function, error: function): void
  • Parameters

    • table: InanoSQLTableConfig
    • alterTable: boolean
    • onRow: function
        • (row: any, i: number): void
        • Parameters

          • row: any
          • i: number

          Returns void

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

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

          • err: any

          Returns void

    Returns void

_delete

  • _delete(onRow: function, complete: function, error: function): void
  • Parameters

    • onRow: function
        • (row: any, i: number): void
        • Parameters

          • row: any
          • i: number

          Returns void

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

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

          • err: any

          Returns void

    Returns void

_describe

  • _describe(type?: "table" | "idx" | "fks"): void
  • Parameters

    • Default value type: "table" | "idx" | "fks" = "table"

    Returns void

_dropTable

  • _dropTable(table: string, complete: function, error: function): void
  • Parameters

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

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

          • err: any

          Returns void

    Returns void

_fastQuery

  • _fastQuery(onRow: function, complete: function): void
  • Parameters

    • onRow: function
        • (row: object, i: number): void
        • Parameters

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

          Returns void

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

    Returns void

_getColValue

_getIndexValues

  • _getIndexValues(indexes: object, row: any): object
  • Parameters

    Returns object

    • [indexName: string]: any

_getRecords

  • _getRecords(onRow: function, complete: function, error: function): void
  • Parameters

    • onRow: function
        • (row: object, i: number): void
        • Parameters

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

          Returns void

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

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

          • err: any

          Returns void

    Returns void

_getTable

  • _getTable(tableName: string, whereCond: any[] | function | undefined, table: any, callback: function): void

_graph

_groupByRows

  • _groupByRows(): void

_maybeJoin

  • _maybeJoin(joinData: InanoSQLJoinArgs[], leftRow: any, onRow: function, complete: function): void
  • Peform a join command.

    internal
    memberof

    _MutateSelection

    Parameters

    • joinData: InanoSQLJoinArgs[]
    • leftRow: any
    • onRow: function
        • (rowData: any): void
        • Parameters

          • rowData: any

          Returns void

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

    Returns void

_newRow

  • _newRow(newRow: any, complete: function, error: function): void
  • Parameters

    • newRow: any
    • complete: function
        • (row: any): void
        • Parameters

          • row: any

          Returns void

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

          • err: any

          Returns void

    Returns void

_onError

  • _onError(err: any): void

_orderByRows

  • _orderByRows(a: any, b: any): number
  • Parameters

    • a: any
    • b: any

    Returns number

_parseSelect

  • _parseSelect(): void

_parseSort

  • _parseSort(sort: string[], checkforIndexes: boolean): InanoSQLSortBy

_parseWhere

  • _parseWhere(qWhere: any[] | function, ignoreIndexes?: undefined | false | true): IWhereArgs
  • Parameters

    • qWhere: any[] | function
    • Optional ignoreIndexes: undefined | false | true

    Returns IWhereArgs

_processLIKE

  • _processLIKE(columnValue: string, givenValue: string): boolean
  • Parameters

    • columnValue: string
    • givenValue: string

    Returns boolean

_rebuildIndexes

  • _rebuildIndexes(progress: function, complete: function, error: function): void
  • Parameters

    • progress: function
        • (row: any, i: any): void
        • Parameters

          • row: any
          • i: any

          Returns void

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

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

          • err: any

          Returns void

    Returns void

_removeRowAndIndexes

  • _removeRowAndIndexes(table: InanoSQLTable, row: any, complete: function, error: function): void
  • Parameters

    • table: InanoSQLTable
    • row: any
    • complete: function
        • (rowOrEv: any): void
        • Parameters

          • rowOrEv: any

          Returns void

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

          • err: any

          Returns void

    Returns void

_resolveFastWhere

  • _resolveFastWhere(onlyGetPKs: any, fastWhere: IWhereCondition, isReversed: boolean, onRow: function, complete: function): void
  • Parameters

    • onlyGetPKs: any
    • fastWhere: IWhereCondition
    • isReversed: boolean
    • onRow: function
        • (row: object, i: number): void
        • Parameters

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

          Returns void

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

    Returns void

_select

  • _select(complete: function, onError: function): void
  • Parameters

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

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

          • error: any

          Returns void

    Returns void

_showTables

  • _showTables(): void

_sortObj

  • Get the sort direction for two objects given the objects, columns and resolve paths.

    internal
    memberof

    _MutateSelection

    Parameters

    Returns number

_streamAS

  • _streamAS(row: any, ignoreFns?: undefined | false | true): any
  • Parameters

    • row: any
    • Optional ignoreFns: undefined | false | true

    Returns any

_tableID

  • _tableID(): string

_updateRow

  • _updateRow(newData: any, oldRow: any, complete: function, error: function): void
  • Parameters

    • newData: any
    • oldRow: any
    • complete: function
        • (row: any): void
        • Parameters

          • row: any

          Returns void

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

          • err: any

          Returns void

    Returns void

_upsert

  • _upsert(onRow: function, complete: function, error: function): void
  • Parameters

    • onRow: function
        • (row: any, i: number): void
        • Parameters

          • row: any
          • i: number

          Returns void

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

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

          • err: any

          Returns void

    Returns void

_where

quickSort

Generated using TypeDoc