Class UserDao<TColumn, TTable, TRow, TResult>Abstract
Constructors
Protected
constructor
- new UserDao<TColumn, TTable, TRow, TResult>(database: string, geoPackage: GeoPackage, userDb: UserConnection<TColumn, TTable, TRow, TResult>, table: TTable): UserDao<TColumn, TTable, TRow, TResult>
-
Parameters
-
database: string
-
-
userDb: UserConnection<TColumn, TTable, TRow, TResult>
-
table: TTable
Returns UserDao<TColumn, TTable, TRow, TResult>
Properties
Protected
Readonly
geoPackage
Protected
projection
projection: Projection
Methods
_buildWhereArgsWithColumnValues
addColumn
- addColumn(column: TColumn): void
-
Returns void
alterColumn
- alterColumn(column: TColumn): void
-
Returns void
alterColumns
- alterColumns(columns: TColumn[]): void
-
Returns void
buildLimit
- buildLimit(limit: number, offset: number): string
-
Parameters
-
limit: number
-
offset: number
Returns string
buildWhere
- buildWhere(field: string, value: any): string
-
Returns string
buildWhereIn
- buildWhereIn(nestedSQL: string, where: string): string
-
Parameters
-
nestedSQL: string
-
where: string
Returns string
buildWhereInArgs
- buildWhereInArgs(nestedArgs: any[], whereArgs: any[]): any[]
-
Parameters
-
nestedArgs: any[]
-
whereArgs: any[]
Returns any[]
buildWhereLike
- buildWhereLike(field: string, value: any): string
-
Returns string
buildWhereWithFields
- buildWhereWithFields(fields: FieldValues, operation??: string): string
-
Parameters
-
-
Optional
operation: string = 'and'
Returns string
buildWhereWithOp
- buildWhereWithOp(field: string, value: any, operation: string): string
-
Parameters
-
field: string
-
value: any
-
operation: string
Returns string
columnCount
- columnCount(): number
-
Returns number
count
- count(where?: string, whereArgs?: [] | DBValue[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): number
-
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
countColumn
- countColumn(distinct: boolean, column: string, where: string, whereArgs: any[]): number
-
Parameters
-
distinct: boolean
-
column: string
-
where: string
-
whereArgs: any[]
Returns number
countColumnIn
- countColumnIn(column: string, nestedSQL: string): number
-
Parameters
-
column: string
-
nestedSQL: string
Returns number
countForEq
- countForEq(fieldName: string, value: any, distinct?: boolean, columns?: string[], groupBy?: string, having?: string, orderBy?: string): number
-
Parameters
-
fieldName: string
-
value: any
-
distinct: boolean = false
-
columns: string[] = ...
-
Optional
groupBy: string
-
Optional
having: string
-
Optional
orderBy: string
Returns number
countForFieldValues
- countForFieldValues(fieldValues: FieldValues): number
-
Returns number
countIn
- countIn(nestedSQL?: string, nestedArgs?: string[], where?: string, whereArgs?: string[]): number
-
Parameters
-
Optional
nestedSQL: string
-
Optional
nestedArgs: string[]
-
Optional
where: string
-
Optional
whereArgs: string[]
Returns number
countInWithColumn
- countInWithColumn(column?: string, nestedSQL?: string, nestedArgs?: string[], where?: string, whereArgs?: string[]): number
-
Parameters
-
Optional
column: string
-
Optional
nestedSQL: string
-
Optional
nestedArgs: string[]
-
Optional
where: string
-
Optional
whereArgs: string[]
Returns number
countInWithDistinct
- countInWithDistinct(distinct?: boolean, nestedSQL?: string, nestedArgs?: string[], where?: string, whereArgs?: string[]): number
-
Parameters
-
Optional
distinct: boolean
-
Optional
nestedSQL: string
-
Optional
nestedArgs: string[]
-
Optional
where: string
-
Optional
whereArgs: string[]
Returns number
countInWithDistinctAndColumn
- countInWithDistinctAndColumn(distinct?: boolean, column?: string, nestedSQL?: string, nestedArgs?: string[], where?: string, whereArgs?: string[]): number
-
Parameters
-
Optional
distinct: boolean
-
Optional
column: string
-
Optional
nestedSQL: string
-
Optional
nestedArgs: string[]
-
Optional
where: string
-
Optional
whereArgs: string[]
Returns number
countWithColumns
- countWithColumns(columns?: string[], where?: string, whereArgs?: [] | DBValue[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): number
-
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
countWithDistinct
- countWithDistinct(distinct?: boolean, where?: string, whereArgs?: [] | DBValue[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): number
-
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
countWithDistinctAndColumns
- countWithDistinctAndColumns(distinct?: boolean, columns?: string[], where?: string, whereArgs?: any[] | DBValue[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): number
-
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
create
- create(row: TRow): number
-
Returns number
delete
- delete(whereClause?: string, whereArgs?: any[]): number
-
Parameters
-
Optional
whereClause: string
-
Optional
whereArgs: any[]
Returns number
deleteAll
- deleteAll(): number
-
Returns number
deleteById
- deleteById(id: number): number
-
Returns number
deleteRow
- deleteRow(row: TRow): number
-
Returns number
deleteWithFieldValues
- deleteWithFieldValues(fieldValues: FieldValues): number
-
Returns number
dropColumn
- dropColumn(column: TColumn): void
-
Returns void
dropColumnIndexes
- dropColumnIndexes(indexes: number[]): void
-
Returns void
dropColumnNames
- dropColumnNames(columnNames: string[]): void
-
Returns void
dropColumnWithIndex
- dropColumnWithIndex(index: number): void
-
Returns void
dropColumnWithName
- dropColumnWithName(columnName: string): void
-
Returns void
dropColumns
- dropColumns(columns: TColumn[]): void
-
Returns void
dropTable
- dropTable(): void
-
Returns void
Protected
Abstract
getBoundingBox
Protected
Abstract
getBoundingBoxWithProjection
- getBoundingBoxWithProjection(projection: Projection): BoundingBox
-
getColumnNames
- getColumnNames(): string[]
-
Returns string[]
getColumns
- getColumns(): TColumn[]
-
Returns TColumn[]
getCount
- getCount(where?: string, whereArgs?: [] | DBValue[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): number
-
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
getCountWithColumns
- getCountWithColumns(columns?: string[], where?: string, whereArgs?: [] | DBValue[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): number
-
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
getCountWithDistinct
- getCountWithDistinct(distinct?: boolean, where?: string, whereArgs?: [] | DBValue[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): number
-
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
getCountWithDistinctAndColumns
- getCountWithDistinctAndColumns(distinct?: boolean, columns?: string[], where?: string, whereArgs?: [] | DBValue[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): number
-
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
getDatabase
- getDatabase(): string
-
Returns string
getPkColumn
- getPkColumn(): TColumn
-
Returns TColumn
getPkColumnIndex
- getPkColumnIndex(): number
-
Returns number
getPkColumnName
- getPkColumnName(): string
-
Returns string
Protected
getPkWhere
- getPkWhere(id: number): string
-
Returns string
Protected
getPkWhereArgs
- getPkWhereArgs(id: number): DBValue[]
-
getProjection
- getProjection(): Projection
-
Returns Projection
getTable
- getTable(): TTable
-
Returns TTable
getTableName
- getTableName(): string
-
Returns string
getZoomLevelForBoundingBox
- getZoomLevelForBoundingBox(): number
-
Returns number
hasPkColumn
- hasPkColumn(): boolean
-
Returns boolean
insert
- insert(row: TRow): number
-
Returns number
insertWithContentValues
- insertWithContentValues(values: ContentValues): number
-
Returns number
isPkModifiable
- isPkModifiable(): boolean
-
Returns boolean
isTableExists
- isTableExists(): boolean
-
Returns boolean
isValueValidation
- isValueValidation(): boolean
-
Returns boolean
max
- max(column: string, where?: string, args?: any): number
-
Parameters
-
column: string
-
Optional
where: string
-
Optional
args: any
Returns number
min
- min(column: string, where?: string, args?: any): number
-
Parameters
-
column: string
-
Optional
where: string
-
Optional
args: any
Returns number
Abstract
newRow
- newRow(): TRow
-
Returns TRow
Protected
prepareResult
- prepareResult(result: TResult): TResult
-
Returns TResult
query
- query(where?: string, whereArgs?: any[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
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
queryForAll
- queryForAll(): TResult
-
Returns TResult
queryForChunk
- queryForChunk(where?: string, whereArgs?: any[], groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
Parameters
-
Optional
where: string
-
Optional
whereArgs: any[]
-
Optional
groupBy: string
-
Optional
having: string
-
Optional
orderBy: string
-
Optional
limit: number
-
Optional
offset: number
Returns TResult
queryForChunkWithColumns
- queryForChunkWithColumns(columns?: string[], where?: string, whereArgs?: any[], groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
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
queryForChunkWithDistinct
- queryForChunkWithDistinct(distinct?: boolean, where?: string, whereArgs?: any[], groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
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
queryForChunkWithDistinctAndColumns
- queryForChunkWithDistinctAndColumns(distinct?: boolean, columns?: string[], where?: string, whereArgs?: any[], groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
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
queryForEq
- queryForEq(property: string, value: any, groupBy?: string, having?: string, orderBy?: string): TResult
-
Parameters
-
property: string
-
value: any
-
Optional
groupBy: string
-
Optional
having: string
-
Optional
orderBy: string
Returns TResult
queryForEqWithColumns
- queryForEqWithColumns(columns?: string[], property: string, value: any, groupBy?: string, having?: string, orderBy?: string): TResult
-
Parameters
-
columns: string[] = ...
-
property: string
-
value: any
-
Optional
groupBy: string
-
Optional
having: string
-
Optional
orderBy: string
Returns TResult
queryForEqWithDistinct
- queryForEqWithDistinct(distinct?: boolean, property: string, value: any, groupBy?: string, having?: string, orderBy?: string): TResult
-
Parameters
-
distinct: boolean = false
-
property: string
-
value: any
-
Optional
groupBy: string
-
Optional
having: string
-
Optional
orderBy: string
Returns TResult
queryForEqWithDistinctAndColumns
- queryForEqWithDistinctAndColumns(distinct?: boolean, columns?: string[], fieldName: string, value: any, groupBy?: string, having?: string, orderBy?: string): TResult
-
Parameters
-
distinct: boolean = false
-
columns: string[] = ...
-
fieldName: string
-
value: any
-
Optional
groupBy: string
-
Optional
having: string
-
Optional
orderBy: string
Returns TResult
queryForEqWithFieldAndValue
- queryForEqWithFieldAndValue(fieldName: string, value: any): TResult
-
Parameters
-
fieldName: string
-
value: any
Returns TResult
queryForFieldValues
- queryForFieldValues(fieldValues: FieldValues): TResult
-
Returns TResult
queryForFieldValuesWithColumns
- queryForFieldValuesWithColumns(columns?: string[], fieldValues: FieldValues): TResult
-
Returns TResult
queryForFieldValuesWithDistinct
- queryForFieldValuesWithDistinct(distinct?: boolean, fieldValues: FieldValues): TResult
-
Parameters
-
distinct: boolean = false
-
Returns TResult
queryForFieldValuesWithDistinctAndColumns
- queryForFieldValuesWithDistinctAndColumns(distinct?: boolean, columns?: string[], fieldValues: FieldValues): TResult
-
Parameters
-
distinct: boolean = false
-
columns: string[] = ...
-
Returns TResult
queryForId
- queryForId(id: number): TResult
-
Returns TResult
queryForIdRow
- queryForIdRow(id: number): TRow
-
Returns TRow
queryForIdRows
- queryForIdRows(ids: number[]): TRow[]
-
Returns TRow[]
queryForLike
- queryForLike(field: string, value: any): TResult
-
Returns TResult
queryIdsSQL
- queryIdsSQL(distinct?: boolean, where?: string): string
-
Parameters
-
distinct: boolean = false
-
Optional
where: string
Returns string
queryIn
- queryIn(nestedSQL?: string, nestedArgs?: any[], where?: string, whereArgs?: any[]): TResult
-
Parameters
-
Optional
nestedSQL: string
-
Optional
nestedArgs: any[]
-
Optional
where: string
-
Optional
whereArgs: any[]
Returns TResult
queryInForChunk
- queryInForChunk(nestedSQL?: string, nestedArgs?: any[], where?: string, whereArgs?: any[], groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
Parameters
-
Optional
nestedSQL: string
-
Optional
nestedArgs: any[]
-
Optional
where: string
-
Optional
whereArgs: any[]
-
Optional
groupBy: string
-
Optional
having: string
-
Optional
orderBy: string
-
Optional
limit: number
-
Optional
offset: number
Returns TResult
queryInForChunkWithColumns
- queryInForChunkWithColumns(columns: string[], nestedSQL?: string, nestedArgs?: any[], where?: string, whereArgs?: any[], groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
Parameters
-
columns: string[]
-
Optional
nestedSQL: string
-
Optional
nestedArgs: any[]
-
Optional
where: string
-
Optional
whereArgs: any[]
-
Optional
groupBy: string
-
Optional
having: string
-
Optional
orderBy: string
-
Optional
limit: number
-
Optional
offset: number
Returns TResult
queryInForChunkWithDistinct
- queryInForChunkWithDistinct(distinct: boolean, nestedSQL?: string, nestedArgs?: any[], where?: string, whereArgs?: any[], groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
Parameters
-
distinct: boolean
-
Optional
nestedSQL: string
-
Optional
nestedArgs: any[]
-
Optional
where: string
-
Optional
whereArgs: any[]
-
Optional
groupBy: string
-
Optional
having: string
-
Optional
orderBy: string
-
Optional
limit: number
-
Optional
offset: number
Returns TResult
queryInForChunkWithDistinctAndColumns
- queryInForChunkWithDistinctAndColumns(distinct: boolean, columns: string[], nestedSQL?: string, nestedArgs?: any[], where?: string, whereArgs?: any[], groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
Parameters
-
distinct: boolean
-
columns: string[]
-
Optional
nestedSQL: string
-
Optional
nestedArgs: any[]
-
Optional
where: string
-
Optional
whereArgs: any[]
-
Optional
groupBy: string
-
Optional
having: string
-
Optional
orderBy: string
-
Optional
limit: number
-
Optional
offset: number
Returns TResult
queryInWithColumns
- queryInWithColumns(columns: string[], nestedSQL?: string, nestedArgs?: any[], where?: string, whereArgs?: any[]): TResult
-
Parameters
-
columns: string[]
-
Optional
nestedSQL: string
-
Optional
nestedArgs: any[]
-
Optional
where: string
-
Optional
whereArgs: any[]
Returns TResult
queryInWithDistinct
- queryInWithDistinct(distinct: boolean, nestedSQL?: string, nestedArgs?: any[], where?: string, whereArgs?: any[]): TResult
-
Parameters
-
distinct: boolean
-
Optional
nestedSQL: string
-
Optional
nestedArgs: any[]
-
Optional
where: string
-
Optional
whereArgs: any[]
Returns TResult
queryInWithDistinctAndColumns
- queryInWithDistinctAndColumns(distinct?: boolean, columns?: string[], nestedSQL?: string, nestedArgs?: any[], where?: string, whereArgs?: any[]): TResult
-
Parameters
-
Optional
distinct: boolean
-
Optional
columns: string[]
-
Optional
nestedSQL: string
-
Optional
nestedArgs: any[]
-
Optional
where: string
-
Optional
whereArgs: any[]
Returns TResult
querySQL
- querySQL(distinct: boolean, columns: string[], where?: string): string
-
Parameters
-
distinct: boolean
-
columns: string[]
-
Optional
where: string
Returns string
querySingleColumnTypedResults
- querySingleColumnTypedResults(sql: string, args: string[], columnName: string, limit?: number): any[]
-
Parameters
-
sql: string
-
args: string[]
-
columnName: string
-
Optional
limit: number
Returns any[]
querySingleColumnTypedResultsWithColumnIndex
- querySingleColumnTypedResultsWithColumnIndex(sql: string, args: string[], columnIndex?: number, limit?: number): any[]
-
Parameters
-
sql: string
-
args: string[]
-
columnIndex: number = 0
-
Optional
limit: number
Returns any[]
querySingleResult
- querySingleResult(sql: string, args: string[]): any
-
Parameters
-
sql: string
-
args: string[]
Returns any
queryWithColumns
- queryWithColumns(columns: string[], where?: string, whereArgs?: any[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
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
queryWithDistinct
- queryWithDistinct(distinct: boolean, where?: string, whereArgs?: any[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
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
queryWithDistinctAndColumns
- queryWithDistinctAndColumns(distinct?: boolean, columns?: string[], where?: string, whereArgs?: any[], join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): TResult
-
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
rawQueryWithArgs
- rawQueryWithArgs(sql: string, selectionArgs?: []): TResult
-
Parameters
-
sql: string
-
Optional
selectionArgs: []
Returns TResult
rawQueryWithColumns
- rawQueryWithColumns(sql: string, columns: string[], selectionArgs: any[]): TResult
-
Parameters
-
sql: string
-
columns: string[]
-
selectionArgs: any[]
Returns TResult
renameColumn
- renameColumn(column: TColumn, newColumnName: string): void
-
Parameters
-
column: TColumn
-
newColumnName: string
Returns void
renameColumnWithIndex
- renameColumnWithIndex(index: number, newColumnName: string): void
-
Parameters
-
index: number
-
newColumnName: string
Returns void
renameColumnWithName
- renameColumnWithName(columnName: string, newColumnName: string): void
-
Parameters
-
columnName: string
-
newColumnName: string
Returns void
Protected
renameTableColumn
- renameTableColumn(columnName: string, newColumnName: string): void
-
Parameters
-
columnName: string
-
newColumnName: string
Returns void
setPkModifiable
- setPkModifiable(pkModifiable: boolean): void
-
Returns void
setValueValidation
- setValueValidation(valueValidation: boolean): void
-
Returns void
update
- update(row: TRow): number
-
Returns number
updateWithContentValues
- updateWithContentValues(values: ContentValues, whereClause?: string, whereArgs?: []): number
-
Parameters
-
-
Optional
whereClause: string
-
Optional
whereArgs: []
Returns number
Abstract UserDao