diff --git a/es/store.d.ts b/es/store.d.ts index 8e59289..6eddbe6 100644 --- a/es/store.d.ts +++ b/es/store.d.ts @@ -94,7 +94,7 @@ export default class TreeStore extends C protected aggregateAbjointRowSync>(entity: T, aggregation: ED[T]['Aggregation'], context: Cxt, option: OP): AggregationResult; protected aggregateAbjointRowAsync>(entity: T, aggregation: ED[T]['Aggregation'], context: Cxt, option: OP): Promise>; protected countAbjointRow>(entity: T, selection: Pick, context: Cxt, option: OP): number; - protected countAbjointRowAsync>(entity: T, selection: Pick, context: Cxt, option: OP): any; + protected countAbjointRowAsync>(entity: T, selection: Pick, context: Cxt, option: OP): Promise; private addToTxnNode; getStat(): { create: number; diff --git a/es/store.js b/es/store.js index 83ebc4a..750434b 100644 --- a/es/store.js +++ b/es/store.js @@ -1693,7 +1693,7 @@ export default class TreeStore extends CascadeStore { id: 1, }, }); - const result = await this.countAbjointRowAsync(entity, selection2, context, Object.assign({}, option, { + const result = await this.selectAbjointRowAsync(entity, selection2, context, Object.assign({}, option, { dontCollect: true, })); return typeof selection.count === 'number' && selection.count > 0 ? Math.min(result.length, selection.count) : result.length; diff --git a/lib/store.d.ts b/lib/store.d.ts index 8e59289..6eddbe6 100644 --- a/lib/store.d.ts +++ b/lib/store.d.ts @@ -94,7 +94,7 @@ export default class TreeStore extends C protected aggregateAbjointRowSync>(entity: T, aggregation: ED[T]['Aggregation'], context: Cxt, option: OP): AggregationResult; protected aggregateAbjointRowAsync>(entity: T, aggregation: ED[T]['Aggregation'], context: Cxt, option: OP): Promise>; protected countAbjointRow>(entity: T, selection: Pick, context: Cxt, option: OP): number; - protected countAbjointRowAsync>(entity: T, selection: Pick, context: Cxt, option: OP): any; + protected countAbjointRowAsync>(entity: T, selection: Pick, context: Cxt, option: OP): Promise; private addToTxnNode; getStat(): { create: number; diff --git a/lib/store.js b/lib/store.js index 00c46ec..3af7677 100644 --- a/lib/store.js +++ b/lib/store.js @@ -1695,7 +1695,7 @@ class TreeStore extends CascadeStore_1.CascadeStore { id: 1, }, }); - const result = await this.countAbjointRowAsync(entity, selection2, context, Object.assign({}, option, { + const result = await this.selectAbjointRowAsync(entity, selection2, context, Object.assign({}, option, { dontCollect: true, })); return typeof selection.count === 'number' && selection.count > 0 ? Math.min(result.length, selection.count) : result.length; diff --git a/src/store.ts b/src/store.ts index 80c1689..9d09d78 100644 --- a/src/store.ts +++ b/src/store.ts @@ -2044,7 +2044,7 @@ export default class TreeStore extends C id: 1, }, }); - const result = await this.countAbjointRowAsync(entity, selection2, context, Object.assign({}, option, { + const result = await this.selectAbjointRowAsync(entity, selection2, context, Object.assign({}, option, { dontCollect: true, }));