Skip to content

Commit

Permalink
docs: Remove latin abbreviations from comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-andersen committed Oct 26, 2023
1 parent 738c99b commit 99ccf38
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ String getAlias() {

/**
* Returns the field on which the aggregation takes place. Returns an empty string if there's no
* field (e.g. for count).
* field (this applies to count).
*/
@Nonnull
String getFieldPath() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ RunAggregationQueryRequest toProto(@Nullable final ByteString transactionId) {
request.getStructuredAggregationQueryBuilder();
structuredAggregationQuery.setStructuredQuery(runQueryRequest.getStructuredQuery());

// We use this set to remove duplicate aggregates. e.g. `aggregate(sum("foo"), sum("foo"))`
// We use this set to remove duplicate aggregates.
// For example, `aggregate(sum("foo"), sum("foo"))`
HashSet<String> uniqueAggregates = new HashSet<>();
List<StructuredAggregationQuery.Aggregation> aggregations = new ArrayList<>();
int aggregationNum = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public class CollectionReference extends Query {
}

/**
* The id of a collection refers to the last component of path pointing to a collection, e.g.
* "collection-id" in "projects/project-id/databases/database-id/documents/collection-id".
* The id of a collection refers to the last component of path pointing to a collection, for
* example "collection-id" in "projects/project-id/databases/database-id/documents/collection-id".
*
* @return The ID of the collection.
*/
Expand Down Expand Up @@ -121,10 +121,10 @@ public DocumentReference document(@Nonnull String childPath) {
/**
* Retrieves the list of documents in this collection.
*
* <p>The document references returned may include references to "missing documents", i.e.
* <p>The document references returned may include references to "missing documents", specifically
* document locations that have no document present but which contain subcollections with
* documents. Attempting to read such a document reference (e.g. via `get()` or `onSnapshot()`)
* will return a `DocumentSnapshot` whose `exists()` method returns false.
* documents. Attempting to read such a document reference (for example via `get()` or
* `onSnapshot()`) will return a `DocumentSnapshot` whose `exists()` method returns false.
*
* @return The list of documents in this collection.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ public QueryDocumentSnapshot getDocument() {

/**
* The index of the changed document in the result set immediately prior to this DocumentChange
* (i.e. supposing that all prior DocumentChange objects have been applied). Returns -1 for
* 'added' events.
* (specifically, supposing that all prior DocumentChange objects have been applied). Returns -1
* for 'added' events.
*/
public int getOldIndex() {
return oldIndex;
}

/**
* The index of the changed document in the result set immediately after this DocumentChange (i.e.
* supposing that all prior DocumentChange objects and the current DocumentChange object have been
* applied). Returns -1 for 'removed' events.
* The index of the changed document in the result set immediately after this DocumentChange
* (specifically, supposing that all prior DocumentChange objects and the current DocumentChange
* object have been applied). Returns -1 for 'removed' events.
*/
public int getNewIndex() {
return newIndex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public Firestore getFirestore() {
}

/**
* The id of a document refers to the last component of path pointing to a document, e.g.
* The id of a document refers to the last component of path pointing to a document, for example
* "document-id" in "projects/project-id/databases/database-id/document-id".
*
* @return The ID of the document.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,8 @@ public Query where(com.google.cloud.firestore.Filter filter) {
+ "startAfter(), endBefore() or endAt().");
FilterInternal parsedFilter = parseFilter(filter);
if (parsedFilter.getFilters().isEmpty()) {
// Return the existing query if not adding any more filters (e.g. an empty composite filter).
// Return the existing query if not adding any more filters (for example an empty composite
// filter).
return this;
}
Builder newOptions = options.toBuilder();
Expand Down Expand Up @@ -1923,7 +1924,8 @@ boolean shouldRetryQuery(
*
* <p>Using the returned query to count the documents is efficient because only the final count,
* not the documents' data, is downloaded. The returned query can even count the documents if the
* result set would be prohibitively large to download entirely (e.g. thousands of documents).
* result set would be prohibitively large to download entirely (for example thousands of
* documents).
*
* @return a query that counts the documents in the result set of this query.
*/
Expand All @@ -1938,7 +1940,7 @@ public AggregateQuery count() {
*
* <p>Using this function to perform aggregations is efficient because only the final aggregation
* values, not the documents' data, is downloaded. This function can even perform aggregations of
* the documents if the result set would be prohibitively large to download entirely (e.g.
* the documents if the result set would be prohibitively large to download entirely (for example
* thousands of documents).
*
* @return an {@link AggregateQuery} that performs aggregations on the documents in the result set
Expand Down

0 comments on commit 99ccf38

Please sign in to comment.