Methods
addColumn
- addColumn(table, col, typ): Query
-
Parameters
-
table: string
-
col: string
-
typ: string
addForeignKey
- addForeignKey(table, name, cols, refCols, refTable, ...options): Query
-
Parameters
-
table: string
-
name: string
-
cols: string[]
-
refCols: string[]
-
refTable: string
-
Rest
...options: string[]
addPrimaryKey
- addPrimaryKey(table, name, ...cols): Query
-
Parameters
-
table: string
-
name: string
-
Rest
...cols: string[]
alterColumn
- alterColumn(table, col, typ): Query
-
Parameters
-
table: string
-
col: string
-
typ: string
createIndex
- createIndex(table, name, ...cols): Query
-
Parameters
-
table: string
-
name: string
-
Rest
...cols: string[]
createTable
- createTable(table, cols, ...options): Query
-
Parameters
-
table: string
-
-
Rest
...options: string[]
createUniqueIndex
- createUniqueIndex(table, name, ...cols): Query
-
Parameters
-
table: string
-
name: string
-
Rest
...cols: string[]
delete
- delete(table, where): Query
-
dropColumn
- dropColumn(table, col): Query
-
Parameters
-
table: string
-
col: string
dropForeignKey
- dropForeignKey(table, name): Query
-
Parameters
-
table: string
-
name: string
dropIndex
- dropIndex(table, name): Query
-
Parameters
-
table: string
-
name: string
dropPrimaryKey
- dropPrimaryKey(table, name): Query
-
Parameters
-
table: string
-
name: string
generatePlaceholder
- generatePlaceholder(i): string
-
Returns string
insert
- insert(table, cols): Query
-
quote
- quote(str): string
-
Returns string
quoteSimpleColumnName
- quoteSimpleColumnName(col): string
-
Returns string
quoteSimpleTableName
- quoteSimpleTableName(table): string
-
Returns string
renameColumn
- renameColumn(table, oldName, newName): Query
-
Parameters
-
table: string
-
oldName: string
-
newName: string
renameTable
- renameTable(oldName, newName): Query
-
Parameters
-
oldName: string
-
newName: string
truncateTable
- truncateTable(table): Query
-
update
- update(table, cols, where): Query
-
upsert
- upsert(table, cols, ...constraints): Query
-
Parameters
-
table: string
-
-
Rest
...constraints: string[]
note: expects both builder to use the same driver