mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fix: add async to the method using setFindOptions() (#10787)
Co-authored-by: Giorgio Boa <35845425+gioboa@users.noreply.github.com> Co-authored-by: Naor Peled <me@naor.dev>
This commit is contained in:
parent
a46eb0a7e1
commit
cc07c90f1d
@ -971,7 +971,7 @@ export class EntityManager {
|
||||
/**
|
||||
* Checks whether any entity exists with the given options.
|
||||
*/
|
||||
exists<Entity extends ObjectLiteral>(
|
||||
async exists<Entity extends ObjectLiteral>(
|
||||
entityClass: EntityTarget<Entity>,
|
||||
options?: FindManyOptions<Entity>,
|
||||
): Promise<boolean> {
|
||||
@ -1002,7 +1002,7 @@ export class EntityManager {
|
||||
* Counts entities that match given options.
|
||||
* Useful for pagination.
|
||||
*/
|
||||
count<Entity extends ObjectLiteral>(
|
||||
async count<Entity extends ObjectLiteral>(
|
||||
entityClass: EntityTarget<Entity>,
|
||||
options?: FindManyOptions<Entity>,
|
||||
): Promise<number> {
|
||||
@ -1020,7 +1020,7 @@ export class EntityManager {
|
||||
* Counts entities that match given conditions.
|
||||
* Useful for pagination.
|
||||
*/
|
||||
countBy<Entity extends ObjectLiteral>(
|
||||
async countBy<Entity extends ObjectLiteral>(
|
||||
entityClass: EntityTarget<Entity>,
|
||||
where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[],
|
||||
): Promise<number> {
|
||||
@ -1144,7 +1144,7 @@ export class EntityManager {
|
||||
* Also counts all entities that match given conditions,
|
||||
* but ignores pagination settings (from and take options).
|
||||
*/
|
||||
findAndCount<Entity extends ObjectLiteral>(
|
||||
async findAndCount<Entity extends ObjectLiteral>(
|
||||
entityClass: EntityTarget<Entity>,
|
||||
options?: FindManyOptions<Entity>,
|
||||
): Promise<[Entity[], number]> {
|
||||
@ -1163,7 +1163,7 @@ export class EntityManager {
|
||||
* Also counts all entities that match given conditions,
|
||||
* but ignores pagination settings (from and take options).
|
||||
*/
|
||||
findAndCountBy<Entity extends ObjectLiteral>(
|
||||
async findAndCountBy<Entity extends ObjectLiteral>(
|
||||
entityClass: EntityTarget<Entity>,
|
||||
where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[],
|
||||
): Promise<[Entity[], number]> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user