gpt4 book ai didi

javascript - 传递给 queryInterface.removeConstraint() 的选项对象的属性是什么?

转载 作者:行者123 更新时间:2023-12-02 21:33:41 32 4
gpt4 key购买 nike

queryInterface.removeConstraint() 的文档没有记录可以传递给 removeConstraint() 方法的 options 对象。事实上,没有记录可以传递给各种 queryInterface 方法的 options 对象...

options 对象是否记录在任何地方?

版本:

  • Sequelize :5.21.3
  • sequelize-cli:5.5.1

最佳答案

是的,该文档应该改进。这是已确认的问题 here 。如果你使用的是TypeScript,你可以在query-interface.d.ts中找到这个options的接口(interface)。文件。

以下是"sequelize": "^5.21.3"的接口(interface):

/**
* Removes constraints from a table
*/
public removeConstraint(tableName: string, constraintName: string, options?: QueryInterfaceOptions): Promise<void>;
/**
* Most of the methods accept options and use only the logger property of the options. That's why the most used
* interface type for options in a method is separated here as another interface.
*/
export interface QueryInterfaceOptions extends Logging, Transactionable {}
export interface Logging {
/**
* A function that gets executed while running the query to log the sql.
*/
logging?: boolean | ((sql: string, timing?: number) => void);

/**
* Pass query execution time in milliseconds as second argument to logging function (options.logging).
*/
benchmark?: boolean;
}
export interface Transactionable {
/**
* Transaction to run query under
*/
transaction?: Transaction;
}

关于javascript - 传递给 queryInterface.removeConstraint() 的选项对象的属性是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60558485/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com