javascript - 传递给 queryInterface.removeConstraint() 的选项对象的属性是什么?
问题描述
queryInterface.removeConstraint()的文档没有记录options
可以传递给该removeConstraint()
方法的对象。事实上,没有任何options
可以传递给各种queryInterface
方法的对象被记录在案......
该options
对象是否记录在任何地方?
版本:
- 续集:5.21.3
- 续集-cli:5.5.1
解决方案
是的,文件应该改进。这是一个已确认的问题。如果你使用的是 TypeScript,你可以options
在query-interface.d.ts文件中找到它的接口。
以下是接口"sequelize": "^5.21.3"
:
/**
* 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;
}
推荐阅读
- http - Delphi - 如何在我的 HTTP 页面上通过 Indy 创建文件夹
- asp.net-core - Entity Framework Core 通过导航名称预先加载(字符串)
- javascript - 问题:我想学习如何使用谷歌应用脚本将数字从网站导入谷歌表格
- java - org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer 上的错误处理条件
- django - 表单中的数据不保存在数据库中(无法验证)
- c# - 在 Visual Studio 2019 的 Program.cs 文件顶部自动生成注释
- android - 假数据预览自定义视图
- c# - 等腰三角形 c#
- c# - StandardOutput.ReadToEnd 无限期挂起
- node.js - 抑制节点“条件专家是一项实验性功能”