Class UserDao<TColumn, TTable, TRow, TResult>Abstract

Abstract UserDao

Type Parameters

Hierarchy

Constructors

Properties

Methods

_buildWhereArgsWithArray _buildWhereArgsWithColumnValues addColumn alterColumn alterColumns buildLimit buildWhere buildWhereArgs buildWhereArgsWithValues buildWhereIn buildWhereInArgs buildWhereLike buildWhereWithFields buildWhereWithOp columnCount count countColumn countColumnIn countForEq countForFieldValues countIn countInWithColumn countInWithDistinct countInWithDistinctAndColumn countWithColumns countWithDistinct countWithDistinctAndColumns create delete deleteAll deleteById deleteRow deleteWithFieldValues dropColumn dropColumnIndexes dropColumnNames dropColumnWithIndex dropColumnWithName dropColumns dropTable getBoundingBox getBoundingBoxWithProjection getColumnNames getColumns getContents getCount getCountWithColumns getCountWithDistinct getCountWithDistinctAndColumns getDatabase getDb getGeoPackage getPkColumn getPkColumnIndex getPkColumnName getPkWhere getPkWhereArgs getProjection getTable getTableName getUserDb getZoomLevelForBoundingBox hasPkColumn insert insertOrThrow insertWithContentValues isPkModifiable isTableExists isValueValidation max min newRow prepareResult projectBoundingBox query queryForAll queryForChunk queryForChunkWithColumns queryForChunkWithDistinct queryForChunkWithDistinctAndColumns queryForEq queryForEqWithColumns queryForEqWithDistinct queryForEqWithDistinctAndColumns queryForEqWithFieldAndValue queryForFieldValues queryForFieldValuesWithColumns queryForFieldValuesWithDistinct queryForFieldValuesWithDistinctAndColumns queryForId queryForIdRow queryForIdRows queryForLike queryIdsSQL queryIn queryInForChunk queryInForChunkWithColumns queryInForChunkWithDistinct queryInForChunkWithDistinctAndColumns queryInWithColumns queryInWithDistinct queryInWithDistinctAndColumns querySQL querySingleColumnTypedResults querySingleColumnTypedResultsWithColumnIndex querySingleResult queryWithColumns queryWithDistinct queryWithDistinctAndColumns rawQueryWithArgs rawQueryWithColumns renameColumn renameColumnWithIndex renameColumnWithName renameTableColumn setPkModifiable setValueValidation update updateWithContentValues

Constructors

Properties

geoPackage: GeoPackage

GeoPackage

projection: Projection

Projection

Methods

  • Add a new column

    Parameters

    • column: TColumn

      new column

    Returns void

  • Alter a column

    Parameters

    • column: TColumn

      column

    Returns void

  • Alter columns

    Parameters

    • columns: TColumn[]

      columns

    Returns void

  • Build a limit String with the limit and offset

    Returns

    limit

    Parameters

    • limit: number

      limit

    • offset: number

      offset

    Returns string

  • Build where (or selection) statement for a single field

    Returns

    where clause

    Parameters

    • field: string

      field name

    • value: any

      field value

    Returns string

  • Build where statement for ids in the nested SQL query

    Returns

    where clause

    Parameters

    • nestedSQL: string

      nested SQL

    • where: string

      where clause

    Returns string

  • Build where args for ids in the nested SQL query

    Returns

    where args

    Parameters

    • nestedArgs: any[]

      nested SQL args

    • whereArgs: any[]

      where arguments

    Returns any[]

  • Build where (or selection) LIKE statement for a single field

    Returns

    where clause

    Parameters

    • field: string

      field name

    • value: any

      field value

    Returns string

  • Build where or selection statement for fields

    Returns

    where clause

    Parameters

    • fields: FieldValues

      columns and values

    • Optional operation: string = 'and'

      AND or OR

    Returns string

  • Build where (or selection) statement for a single field using the provided operation

    Returns

    where clause

    Parameters

    • field: string

      field

    • value: any

      value

    • operation: string

      operation

    Returns string

  • Count

    Parameters

    • Optional where: string
    • Optional whereArgs: [] | DBValue[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns number

  • Get a count of results

    Parameters

    • distinct: boolean
    • column: string
    • where: string
    • whereArgs: any[]

    Returns number

  • Get the count in the nested SQL query

    Returns

    count

    Parameters

    • column: string

      count column name

    • nestedSQL: string

      nested SQL

    Returns number

  • Query for the row where the field equals the value

    Parameters

    • fieldName: string
    • value: any
    • distinct: boolean = false
    • columns: string[] = ...
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string

    Returns number

  • Get the count in the nested SQL query

    Returns

    count

    Parameters

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: string[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: string[]

      where arguments

    Returns number

  • Get the count in the nested SQL query

    Returns

    count

    Parameters

    • Optional column: string

      count column name

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: string[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: string[]

      where arguments

    Returns number

  • Get the count in the nested SQL query

    Returns

    count

    Parameters

    • Optional distinct: boolean

      distinct column values

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: string[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: string[]

      where arguments

    Returns number

  • Get the count in the nested SQL query

    Returns

    count

    Parameters

    • Optional distinct: boolean

      distinct column values

    • Optional column: string

      count column name

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: string[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: string[]

      where arguments

    Returns number

  • Count

    Parameters

    • columns: string[] = ...
    • Optional where: string
    • Optional whereArgs: [] | DBValue[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns number

  • Count

    Parameters

    • distinct: boolean = false
    • Optional where: string
    • Optional whereArgs: [] | DBValue[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns number

  • Count

    Parameters

    • distinct: boolean = false
    • columns: string[] = ...
    • Optional where: string
    • Optional whereArgs: any[] | DBValue[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns number

  • Delete rows matching the where clause

    Returns

    deleted count

    Parameters

    • Optional whereClause: string

      where clause

    • Optional whereArgs: any[]

      where arguments

    Returns number

  • Delete a row by id

    Returns

    number of rows affected, should be 0 or 1

    Parameters

    • id: number

      id

    Returns number

  • Delete the row passed in

    Parameters

    • row: TRow

    Returns number

  • Drop a column

    Parameters

    • column: TColumn

      column

    Returns void

  • Drop columns

    Parameters

    • indexes: number[]

      column indexes

    Returns void

  • Drop columns

    Parameters

    • columnNames: string[]

      column names

    Returns void

  • Drop a column

    Parameters

    • index: number

      column index

    Returns void

  • Drop a column

    Parameters

    • columnName: string

      column name

    Returns void

  • Drop columns

    Parameters

    • columns: TColumn[]

      columns

    Returns void

  • Get the bounding box of the user table data

    Returns

    bounding box of user table data

    Parameters

    • projection: Projection

      desired projection

    Returns BoundingBox

  • Get the table column names

    Returns

    column names

    Returns string[]

  • Gets the count

    Parameters

    • Optional where: string
    • Optional whereArgs: [] | DBValue[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns number

  • Gets the count

    Parameters

    • columns: string[] = ...
    • Optional where: string
    • Optional whereArgs: [] | DBValue[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns number

  • Gets the count

    Parameters

    • distinct: boolean = false
    • Optional where: string
    • Optional whereArgs: [] | DBValue[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns number

  • Gets the count

    Parameters

    • distinct: boolean = false
    • columns: string[] = ...
    • Optional where: string
    • Optional whereArgs: [] | DBValue[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns number

  • Get the primary key column

    Returns

    primary key column

    Returns TColumn

  • Get the primary key column index

    Returns

    primary key column index

    Returns number

  • Get the primary key column name

    Returns

    primary key column name

    Returns string

  • Get the primary key where clause

    Returns

    primary key where clause

    Parameters

    • id: number

      id

    Returns string

  • Get the projection

    Returns

    projection

    Returns Projection

  • Get the approximate zoom level of where the bounding box of the user data fits into the world

    Returns

    zoom level

    Returns number

  • Check if the table has a primary key column

    Returns

    true if has a primary key

    Returns boolean

  • Is the primary key modifiable

    Returns

    true if the primary key is modifiable

    Returns boolean

  • Is value validation against column types enabled

    Returns

    true if values are validated against column types

    Returns boolean

  • Get the max result of the column

    Returns

    max or null

    Parameters

    • column: string

      column name

    • Optional where: string

      where clause

    • Optional args: any

      where arugments

    Returns number

  • Get the min result of the column

    Returns

    min or null

    Parameters

    • column: string

      column name

    • Optional where: string

      where clause

    • Optional args: any

      where arugments

    Returns number

  • Prepare the result before returning

    Returns

    prepared result

    Parameters

    • result: TResult

      result

    Returns TResult

  • Project the provided bounding box in the declared projection to the user DAO projection

    Returns

    projected bounding box

    Parameters

    • boundingBox: BoundingBox

      bounding box

    • projection: Projection

      projection

    Returns BoundingBox

  • Query

    Parameters

    • Optional where: string
    • Optional whereArgs: any[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns TResult

  • Query for ordered rows starting at the offset and returning no more than the limit.

    Parameters

    • Optional where: string
    • Optional whereArgs: any[]
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns TResult

  • Query for ordered rows starting at the offset and returning no more than the limit.

    Parameters

    • columns: string[] = ...
    • Optional where: string
    • Optional whereArgs: any[]
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns TResult

  • Query for ordered rows starting at the offset and returning no more than the limit.

    Parameters

    • distinct: boolean = false
    • Optional where: string
    • Optional whereArgs: any[]
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns TResult

  • Query for ordered rows starting at the offset and returning no more than the limit.

    Parameters

    • distinct: boolean = false
    • columns: string[] = ...
    • Optional where: string
    • Optional whereArgs: any[]
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns TResult

  • Query for the row where all fields match their values

    Returns

    result

    Parameters

    • property: string

      property name

    • value: any

      property value

    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string

    Returns TResult

  • Query for the row where all fields match their values

    Returns

    result

    Parameters

    • columns: string[] = ...

      columns

    • property: string

      property name

    • value: any

      property value

    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string

    Returns TResult

  • Query for the row where all fields match their values

    Returns

    result

    Parameters

    • distinct: boolean = false

      distinct rows

    • property: string

      property name

    • value: any

      property value

    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string

    Returns TResult

  • Query for the row where the field equals the value

    Parameters

    • distinct: boolean = false
    • columns: string[] = ...
    • fieldName: string
    • value: any
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string

    Returns TResult

  • Query for the row where the field equals the value

    Returns

    result

    Parameters

    • fieldName: string

      field name

    • value: any

      value

    Returns TResult

  • Query for the row where all fields match their values

    Returns

    result

    Parameters

    • columns: string[] = ...

      columns

    • fieldValues: FieldValues

      field values

    Returns TResult

  • Query for the row where all fields match their values

    Returns

    result

    Parameters

    • distinct: boolean = false

      distinct rows

    • fieldValues: FieldValues

      field values

    Returns TResult

  • Query for the row where all fields match their values

    Returns

    result

    Parameters

    • distinct: boolean = false

      distinct rows

    • columns: string[] = ...

      columns

    • fieldValues: FieldValues

      field values

    Returns TResult

  • Query for the row with the provided id

    Returns

    row

    Parameters

    • id: number

      id

    Returns TResult

  • Query for the row with the provided id

    Returns

    row

    Parameters

    • id: number

      id

    Returns TRow

  • Gets the rows in this table by id

    Returns

    rows array

    Parameters

    • ids: number[]

      ids to query for

    Returns TRow[]

  • Query for the rows that are like the column

    Returns

    result

    Parameters

    • field: string
    • value: any

    Returns TResult

  • Query SQL for all row ids

    Returns

    SQL

    Parameters

    • distinct: boolean = false

      distinct rows

    • Optional where: string

      where

    Returns string

  • Query for rows by ids in the nested SQL query

    Returns

    result

    Parameters

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: any[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: any[]

      where arguments

    Returns TResult

  • Query for ordered rows by ids in the nested SQL query, starting at the offset and returning no more than the limit.

    Returns

    result

    Parameters

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: any[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: any[]

      where arguments

    • Optional groupBy: string

      group by

    • Optional having: string

      having

    • Optional orderBy: string

      order by

    • Optional limit: number

      chunk limit

    • Optional offset: number

      chunk offset

    Returns TResult

  • Query for ordered rows by ids in the nested SQL query, starting at the offset and returning no more than the limit.

    Returns

    result

    Parameters

    • columns: string[]

      columns

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: any[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: any[]

      where arguments

    • Optional groupBy: string

      group by

    • Optional having: string

      having

    • Optional orderBy: string

      order by

    • Optional limit: number

      chunk limit

    • Optional offset: number

      chunk offset

    Returns TResult

  • Query for ordered rows by ids in the nested SQL query, starting at the offset and returning no more than the limit.

    Returns

    result

    Parameters

    • distinct: boolean

      distinct rows

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: any[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: any[]

      where arguments

    • Optional groupBy: string

      group by

    • Optional having: string

      having

    • Optional orderBy: string

      order by

    • Optional limit: number

      chunk limit

    • Optional offset: number

      chunk offset

    Returns TResult

  • Query for ordered rows by ids in the nested SQL query, starting at the offset and returning no more than the limit.

    Returns

    result

    Parameters

    • distinct: boolean

      distinct rows

    • columns: string[]

      columns

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: any[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: any[]

      where arguments

    • Optional groupBy: string

      group by

    • Optional having: string

      having

    • Optional orderBy: string

      order by

    • Optional limit: number

      chunk limit

    • Optional offset: number

      chunk offset

    Returns TResult

  • Query for rows by ids in the nested SQL query

    Returns

    result

    Parameters

    • columns: string[]

      columns

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: any[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: any[]

      where arguments

    Returns TResult

  • Query for rows by ids in the nested SQL query

    Returns

    result

    Parameters

    • distinct: boolean

      distinct rows

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: any[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: any[]

      where arguments

    Returns TResult

  • Query for rows by ids in the nested SQL query

    Returns

    result

    Parameters

    • Optional distinct: boolean

      distinct rows

    • Optional columns: string[]

      columns

    • Optional nestedSQL: string

      nested SQL

    • Optional nestedArgs: any[]

      nested SQL args

    • Optional where: string

      where clause

    • Optional whereArgs: any[]

      where arguments

    Returns TResult

  • Query SQL for all rows

    Returns

    SQL

    Parameters

    • distinct: boolean

      distinct rows

    • columns: string[]

      columns

    • Optional where: string

      where

    Returns string

  • Query for typed values from the first column

    Returns

    single column values

    Parameters

    • sql: string

      sql statement

    • args: string[]

      sql arguments

    • columnName: string
    • Optional limit: number

    Returns any[]

  • Query for typed values from the first column

    Returns

    single column values

    Parameters

    • sql: string

      sql statement

    • args: string[]

      sql arguments

    • columnIndex: number = 0
    • Optional limit: number

    Returns any[]

  • Query the SQL for a single result object in the first column

    Returns

    single result object

    Parameters

    • sql: string

      sql statement

    • args: string[]

      sql arguments

    Returns any

  • Query

    Parameters

    • columns: string[]
    • Optional where: string
    • Optional whereArgs: any[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns TResult

  • Query

    Parameters

    • distinct: boolean
    • Optional where: string
    • Optional whereArgs: any[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns TResult

  • Query

    Parameters

    • distinct: boolean = false
    • columns: string[] = ...
    • Optional where: string
    • Optional whereArgs: any[]
    • Optional join: string
    • Optional groupBy: string
    • Optional having: string
    • Optional orderBy: string
    • Optional limit: number
    • Optional offset: number

    Returns TResult

  • Raw query

    Returns

    result

    Parameters

    • sql: string

      SQL

    • Optional selectionArgs: []

      selection args

    Returns TResult

  • Raw query

    Returns

    result

    Parameters

    • sql: string

      SQL

    • columns: string[]

      subset of table columns defined in the SQL

    • selectionArgs: any[]

      selection args

    Returns TResult

  • Rename column

    Parameters

    • column: TColumn

      column

    • newColumnName: string

      new column name

    Returns void

  • Rename column

    Parameters

    • index: number

      column index

    • newColumnName: string

      new column name

    Returns void

  • Rename column

    Parameters

    • columnName: string

      column name

    • newColumnName: string

      new column name

    Returns void

  • Rename a table column

    Parameters

    • columnName: string

      column name

    • newColumnName: string

      new column name

    Returns void

  • Set if the primary key can be modified

    Parameters

    • pkModifiable: boolean

      primary key modifiable flag

    Returns void

  • Set if values should validated against column types

    Parameters

    • valueValidation: boolean

      value validation flag

    Returns void

  • Update all rows matching the where clause with the provided values

    Returns

    updated count

    Parameters

    • values: ContentValues

      content values

    • Optional whereClause: string

      where clause

    • Optional whereArgs: []

      where arguments

    Returns number

Generated using TypeDoc