方法摘要
公共方法 | ||
public |
async removeColumn(tableName: *, attributeName: *, options: *): * 此包裝器修正了 MSSQL 無法在現有表格具有預設約束時,乾淨地移除欄位。 |
|
public |
async upsert(tableName: *, insertValues: *, updateValues: *, where: *, options: *): * |
繼承摘要
來自類別 QueryInterface | ||
public |
在表格中新增一個新的欄位 |
|
public |
async addConstraint(tableName: string, options: object): Promise 在表格中新增一個約束 |
|
public |
async addIndex(tableName: string | object, attributes: Array, options: object, rawTablename: string): Promise 為欄位新增索引 |
|
public |
從表格中刪除多筆記錄 |
|
public |
將多筆記錄插入表格 |
|
public |
async bulkUpdate(tableName: string, values: object, identifier: object, options: object, attributes: object): Promise 更新表格中的多筆記錄 |
|
public |
async changeColumn(tableName: string, attributeName: string, dataTypeOrOptions: object, options: object): * 變更欄位定義 |
|
public |
async createDatabase(database: string, options: object): Promise 建立資料庫 |
|
public |
async createFunction(functionName: string, params: Array, returnType: string, language: string, body: string, optionsArray: Array, options: object): Promise 建立 SQL 函數 |
|
public |
async createSchema(schema: string, options: object): Promise 建立結構描述 |
|
public |
使用給定的屬性集合建立表格 |
|
public |
async describeTable(tableName: string, options: object): Promise<object> 描述表格結構 |
|
public |
async dropAllSchemas(options: object): Promise 刪除所有結構描述 |
|
public |
async dropAllTables(options: object): Promise 從資料庫中刪除所有表格 |
|
public |
async dropDatabase(database: string, options: object): Promise 刪除資料庫 |
|
public |
async dropFunction(functionName: string, params: Array, options: object): Promise 刪除 SQL 函數 |
|
public |
async dropSchema(schema: string, options: object): Promise 刪除結構描述 |
|
public |
從資料庫中刪除表格 |
|
public |
async getForeignKeyReferencesForTable(tableName: string, options: object): * 取得表格的外鍵參考詳細資訊 |
|
public |
async getForeignKeysForTables(tableNames: string[], options: object): Promise 傳回請求表格的所有外鍵約束 |
|
public |
quoteIdentifier(identifier: string, force: boolean): string 將識別符號清單以 "." 分隔並引用每個部分 |
|
public |
quoteIdentifiers(identifiers: string): string 將識別符號清單以 "." 分隔並引用每個部分。 |
|
public |
async removeColumn(tableName: string, attributeName: string, options: object): * 從資料表中移除欄位 |
|
public |
async removeConstraint(tableName: string, constraintName: string, options: object): * 從資料表中移除約束 |
|
public |
async removeIndex(tableName: string, indexNameOrAttributes: string | string[], options: object): Promise 從資料表中移除已存在的索引 |
|
public |
async renameColumn(tableName: string, attrNameBefore: string, attrNameAfter: string, options: object): Promise 重新命名欄位 |
|
public |
async renameFunction(oldFunctionName: string, params: Array, newFunctionName: string, options: object): Promise 重新命名 SQL 函式 |
|
public |
async renameTable(before: string, after: string, options: object): Promise 重新命名資料表 |
|
public |
async showAllSchemas(options: object): Promise<Array> 顯示所有綱要 |
|
public |
async tableExists(tableName: TableName, options: QueryOptions): Promise<boolean> 回傳一個 Promise,如果資料表存在於資料庫中則解析為 true,否則解析為 false。 |
|
public |
async upsert(tableName: string, insertValues: object, updateValues: object, where: object, options: object): Promise<boolean, ?number> 更新或插入 (Upsert) |
公共方法
public async removeColumn(tableName: *, attributeName: *, options: *): * source
此包裝器修正了 MSSQL 無法在現有表格具有預設約束時,乾淨地移除欄位。
參數
名稱 | 類型 | 屬性 | 描述 |
tableName | * | ||
attributeName | * | ||
options | * |
回傳
* |
public async upsert(tableName: *, insertValues: *, updateValues: *, where: *, options: *): * source
更新或插入 (Upsert)
參數
名稱 | 類型 | 屬性 | 描述 |
tableName | * | ||
insertValues | * | ||
updateValues | * | ||
where | * | ||
options | * |
回傳
* |