File tree Expand file tree Collapse file tree 7 files changed +28
-22
lines changed Expand file tree Collapse file tree 7 files changed +28
-22
lines changed Original file line number Diff line number Diff line change 2
2
' @firebase/firestore ' : minor
3
3
---
4
4
5
- Expose getCountFromServer() and Lite SDK getCount()to enable Firestore count-only aggregate queries
5
+ Added ` getCountFromServer() ` ( ` getCount() ` in the Lite SDK), which fetches the number of documents in the result set without actually downloading the documents.
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ export {
31
31
aggregateQuerySnapshotEqual ,
32
32
getCount
33
33
} from '../src/lite-api/aggregate' ;
34
+
34
35
export {
35
36
AggregateField ,
36
37
AggregateFieldType ,
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
+ export {
19
+ aggregateQuerySnapshotEqual ,
20
+ getCountFromServer
21
+ } from './api/aggregate' ;
22
+
18
23
export {
19
24
AggregateField ,
20
25
AggregateFieldType ,
21
26
AggregateSpec ,
22
27
AggregateSpecData ,
23
28
AggregateQuerySnapshot ,
24
- aggregateQuerySnapshotEqual ,
25
- count ,
26
- getCountFromServer
27
- } from './api/aggregate' ;
29
+ count
30
+ } from './lite-api/aggregate_types' ;
28
31
29
32
export { FieldPath , documentId } from './api/field_path' ;
30
33
Original file line number Diff line number Diff line change 17
17
18
18
import { Query } from '../api' ;
19
19
import { firestoreClientRunCountQuery } from '../core/firestore_client' ;
20
- import { AggregateField , AggregateQuerySnapshot } from '../lite-api/aggregate_types' ;
20
+ import {
21
+ AggregateField ,
22
+ AggregateQuerySnapshot
23
+ } from '../lite-api/aggregate_types' ;
21
24
import { cast } from '../util/input_validation' ;
22
25
23
26
import { ensureFirestoreConfigured , Firestore } from './database' ;
24
27
import { ExpUserDataWriter } from './reference_impl' ;
25
28
26
- export {
27
- aggregateQuerySnapshotEqual
28
- } from '../lite-api/aggregate' ;
29
- export {
30
- AggregateField ,
31
- AggregateFieldType ,
32
- AggregateSpec ,
33
- AggregateSpecData ,
34
- AggregateQuerySnapshot ,
35
- count
36
- } from '../lite-api/aggregate_types' ;
29
+ export { aggregateQuerySnapshotEqual } from '../lite-api/aggregate' ;
37
30
38
31
/**
39
32
* Executes the query and returns the results as a `AggregateQuerySnapshot` from the
Original file line number Diff line number Diff line change 16
16
*/
17
17
18
18
import { AbstractUserDataWriter , Query } from '../api' ;
19
- import { AggregateField , AggregateQuerySnapshot } from '../lite-api/aggregate_types' ;
19
+ import {
20
+ AggregateField ,
21
+ AggregateQuerySnapshot
22
+ } from '../lite-api/aggregate_types' ;
20
23
import { Value } from '../protos/firestore_proto_api' ;
21
24
import { Datastore , invokeRunAggregationQueryRpc } from '../remote/datastore' ;
22
25
import { hardAssert } from '../util/assert' ;
@@ -25,7 +28,7 @@ import { hardAssert } from '../util/assert';
25
28
* CountQueryRunner encapsulates the logic needed to run the count aggregation
26
29
* queries.
27
30
*/
28
- export class CountQueryRunner < T > {
31
+ export class CountQueryRunner {
29
32
constructor (
30
33
private readonly query : Query < unknown > ,
31
34
private readonly datastore : Datastore ,
Original file line number Diff line number Diff line change 16
16
*/
17
17
18
18
import { GetOptions } from '@firebase/firestore-types' ;
19
- import { AbstractUserDataWriter } from '../api' ;
19
+
20
20
import {
21
+ AbstractUserDataWriter ,
21
22
AggregateField ,
22
23
AggregateQuerySnapshot
23
- } from '../api/aggregate ' ;
24
+ } from '../api' ;
24
25
import { LoadBundleTask } from '../api/bundle' ;
25
26
import {
26
27
CredentialChangeListener ,
Original file line number Diff line number Diff line change 16
16
*/
17
17
18
18
import { deepEqual } from '@firebase/util' ;
19
+
19
20
import { CountQueryRunner } from '../core/count_query_runner' ;
20
21
import { cast } from '../util/input_validation' ;
21
22
22
- import { AggregateField , AggregateQuerySnapshot , AggregateSpec } from './aggregate_types' ;
23
+ import {
24
+ AggregateField ,
25
+ AggregateQuerySnapshot ,
26
+ AggregateSpec
27
+ } from './aggregate_types' ;
23
28
import { getDatastore } from './components' ;
24
29
import { Firestore } from './database' ;
25
30
import { Query , queryEqual } from './reference' ;
You can’t perform that action at this time.
0 commit comments