1- // Copyright 2022 Google LLC
1+ // Copyright 2023 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -136,25 +136,28 @@ message StructuredQuery {
136136 //
137137 // Requires:
138138 //
139- // * That `value` is a non-empty `ArrayValue` with at most 10 values.
140- // * No other `IN` or `ARRAY_CONTAINS_ANY` or `NOT_IN`.
139+ // * That `value` is a non-empty `ArrayValue`, subject to disjunction
140+ // limits.
141+ // * No `NOT_IN` filters in the same query.
141142 IN = 8 ;
142143
143144 // The given `field` is an array that contains any of the values in the
144145 // given array.
145146 //
146147 // Requires:
147148 //
148- // * That `value` is a non-empty `ArrayValue` with at most 10 values.
149- // * No other `IN` or `ARRAY_CONTAINS_ANY` or `NOT_IN`.
149+ // * That `value` is a non-empty `ArrayValue`, subject to disjunction
150+ // limits.
151+ // * No other `ARRAY_CONTAINS_ANY` filters within the same disjunction.
152+ // * No `NOT_IN` filters in the same query.
150153 ARRAY_CONTAINS_ANY = 9 ;
151154
152155 // The value of the `field` is not in the given array.
153156 //
154157 // Requires:
155158 //
156159 // * That `value` is a non-empty `ArrayValue` with at most 10 values.
157- // * No other `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`,
160+ // * No other `OR`, ` IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`,
158161 // `IS_NOT_NULL`, or `IS_NOT_NAN`.
159162 // * That `field` comes first in the `order_by`.
160163 NOT_IN = 10 ;
@@ -251,7 +254,11 @@ message StructuredQuery {
251254 repeated FieldReference fields = 2 ;
252255 }
253256
254- // The projection to return.
257+ // Optional sub-set of the fields to return.
258+ //
259+ // This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the
260+ // documents returned from a query. When not set, assumes that the caller
261+ // wants all fields returned.
255262 Projection select = 1 ;
256263
257264 // The collections to query.
@@ -349,7 +356,7 @@ message StructuredQuery {
349356// Firestore query for running an aggregation over a
350357// [StructuredQuery][google.firestore.v1.StructuredQuery].
351358message StructuredAggregationQuery {
352- // Defines a aggregation that produces a single result.
359+ // Defines an aggregation that produces a single result.
353360 message Aggregation {
354361 // Count of documents that match the query.
355362 //
@@ -360,7 +367,7 @@ message StructuredAggregationQuery {
360367 // count.
361368 //
362369 // This provides a way to set an upper bound on the number of documents
363- // to scan, limiting latency and cost.
370+ // to scan, limiting latency, and cost.
364371 //
365372 // Unspecified is interpreted as no bound.
366373 //
@@ -394,7 +401,7 @@ message StructuredAggregationQuery {
394401 // COUNT_UP_TO(1) AS count_up_to_1,
395402 // COUNT_UP_TO(2),
396403 // COUNT_UP_TO(3) AS count_up_to_3,
397- // COUNT_UP_TO(4 )
404+ // COUNT(* )
398405 // OVER (
399406 // ...
400407 // );
@@ -407,7 +414,7 @@ message StructuredAggregationQuery {
407414 // COUNT_UP_TO(1) AS count_up_to_1,
408415 // COUNT_UP_TO(2) AS field_1,
409416 // COUNT_UP_TO(3) AS count_up_to_3,
410- // COUNT_UP_TO(4 ) AS field_2
417+ // COUNT(* ) AS field_2
411418 // OVER (
412419 // ...
413420 // );
0 commit comments