feat: update repository api doc

This commit is contained in:
chenos 2021-11-20 13:56:47 +08:00
parent 18089eb56c
commit 0025d0051f

View File

@ -421,6 +421,31 @@ await repository.findOne({
}); });
``` ```
## repository.count()
##### Definition
```ts
interface count {
(options?: CountOptions): Promise<number>;
}
interface CountOptions extends Sequelize.CountOptions {
filter?: any;
}
// Sequelize.CountOptions 的参数说明
// distinct 就不传了自动处理有关联数据时distinct=true
```
##### Examples
```ts
repository.count({
filter: {},
});
```
## repository.create() ## repository.create()
创建数据 创建数据