Skip to content

Commit

Permalink
Tweak Count API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dconeybe committed Jan 9, 2024
1 parent d7ace80 commit 129890f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions packages/firestore/src/api/aggregate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ export {
} from '../lite-api/aggregate';

/**
* Calculates the number of documents in the result set of the given query,
* Calculates the number of documents in the result set of the given query
* without actually downloading the documents.
*
* Using this function to count the documents is efficient because only the
* final count, not the documents' data, is downloaded. This function can even
* final count, not the documents' data, is downloaded. This function can
* count the documents if the result set would be prohibitively large to
* download entirely (e.g. thousands of documents).
* download entirely (thousands of documents).
*
* The result received from the server is presented, unaltered, without
* considering any local state. That is, documents in the local cache are not
* taken into consideration, neither are local modifications not yet
* synchronized with the server. Previously-downloaded results, if any, are not
* used: every request using this source necessarily involves a round trip to
* used. Every request using this source necessarily involves a round trip to
* the server.
*
* @param query - The query whose result set size to calculate.
* @param query - The query whose result set size is calculated.
* @returns A Promise that will be resolved with the count; the count can be
* retrieved from `snapshot.data().count`, where `snapshot` is the
* `AggregateQuerySnapshot` to which the returned Promise resolves.
Expand All @@ -77,21 +77,21 @@ export function getCountFromServer<

/**
* Calculates the specified aggregations over the documents in the result
* set of the given query, without actually downloading the documents.
* set of the given query without actually downloading the documents.
*
* Using this function to perform aggregations is efficient because only the
* final aggregation values, not the documents' data, are downloaded. This
* function can even perform aggregations of the documents if the result set
* would be prohibitively large to download entirely (e.g. thousands of documents).
* function can perform aggregations of the documents if the result set would be
* prohibitively large to download entirely (thousands of documents).
*
* The result received from the server is presented, unaltered, without
* considering any local state. That is, documents in the local cache are not
* taken into consideration, neither are local modifications not yet
* synchronized with the server. Previously-downloaded results, if any, are not
* used: every request using this source necessarily involves a round trip to
* used. Every request using this source necessarily involves a round trip to
* the server.
*
* @param query The query whose result set to aggregate over.
* @param query The query whose result set is aggregated over.
* @param aggregateSpec An `AggregateSpec` object that specifies the aggregates
* to perform over the result set. The AggregateSpec specifies aliases for each
* aggregate, which can be used to retrieve the aggregate result.
Expand Down
18 changes: 9 additions & 9 deletions packages/firestore/src/lite-api/aggregate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ import { LiteUserDataWriter } from './reference_impl';
import { fieldPathFromArgument } from './user_data_reader';

/**
* Calculates the number of documents in the result set of the given query,
* Calculates the number of documents in the result set of the given query
* without actually downloading the documents.
*
* Using this function to count the documents is efficient because only the
* final count, not the documents' data, is downloaded. This function can even
* count the documents if the result set would be prohibitively large to
* download entirely (e.g. thousands of documents).
* final count, not the documents' data, is downloaded. This function can
* count the documents in cases where the result set would be prohibitively
* large to download entirely (thousands of documents).
*
* @param query - The query whose result set size to calculate.
* @param query - The query whose result set size is calculated.
* @returns A Promise that will be resolved with the count; the count can be
* retrieved from `snapshot.data().count`, where `snapshot` is the
* `AggregateQuerySnapshot` to which the returned Promise resolves.
Expand All @@ -67,14 +67,14 @@ export function getCount<AppModelType, DbModelType extends DocumentData>(

/**
* Calculates the specified aggregations over the documents in the result
* set of the given query, without actually downloading the documents.
* set of the given query without actually downloading the documents.
*
* Using this function to perform aggregations is efficient because only the
* final aggregation values, not the documents' data, are downloaded. This
* function can even perform aggregations of the documents if the result set
* would be prohibitively large to download entirely (e.g. thousands of documents).
* function can perform aggregations of the documents if the result set would be
* prohibitively large to download entirely (thousands of documents).
*
* @param query The query whose result set to aggregate over.
* @param query The query whose result set is aggregated over.
* @param aggregateSpec An `AggregateSpec` object that specifies the aggregates
* to perform over the result set. The AggregateSpec specifies aliases for each
* aggregate, which can be used to retrieve the aggregate result.
Expand Down

0 comments on commit 129890f

Please sign in to comment.