Methods
Static
buildCount
- buildCount(tables: string, where?: string): string
-
Parameters
-
tables: string
-
Optional
where: string
Returns string
Static
buildInsert
- buildInsert(table: string, object: any): string
-
Parameters
-
table: string
-
object: any
Returns string
Static
buildInsertFromColumnNames
- buildInsertFromColumnNames(table: string, object: any): string
-
Parameters
-
table: string
-
object: any
Returns string
Static
buildObjectUpdate
- buildObjectUpdate(table: string, object: any): string
-
Parameters
-
table: string
-
object: any
Returns string
Static
buildQuery
- buildQuery(distinct: boolean, tables: string, columns?: string[], where?: string, join?: string, groupBy?: string, having?: string, orderBy?: string, limit?: number, offset?: number): string
-
Parameters
-
distinct: boolean
-
tables: string
-
Optional
columns: string[]
-
Optional
where: string
-
Optional
join: string
-
Optional
groupBy: string
-
Optional
having: string
-
Optional
orderBy: string
-
Optional
limit: number
-
Optional
offset: number
Returns string
Static
buildUpdate
- buildUpdate(table: string, values: Record<string, DBValue>, where?: string, whereArgs?: DBValue | DBValue[]): {
args: DBValue[];
sql: string;
}
-
Parameters
-
table: string
-
values: Record<string, DBValue>
-
Optional
where: string
-
Returns {
args: DBValue[];
sql: string;
}
Static
buildUpdateOrInsertObject
- buildUpdateOrInsertObject(object: any): any
-
Returns any
Static
fixColumnName
- fixColumnName(columnName: string): string
-
Returns string
Utility class to build sql queries