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