Skip to content

Commit e2b7cb9

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add bloom filter related proto fields (only in the preview API surface)
PiperOrigin-RevId: 527090049
1 parent 7233adf commit e2b7cb9

6 files changed

Lines changed: 34 additions & 20 deletions

File tree

google/firestore/v1/aggregation_result.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.

google/firestore/v1/common.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.

google/firestore/v1/document.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.

google/firestore/v1/firestore.proto

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.
@@ -178,16 +178,16 @@ service Firestore {
178178
}
179179

180180
// Streams batches of document updates and deletes, in order. This method is
181-
// only available via the gRPC API (not REST).
181+
// only available via gRPC or WebChannel (not REST).
182182
rpc Write(stream WriteRequest) returns (stream WriteResponse) {
183183
option (google.api.http) = {
184184
post: "/v1/{database=projects/*/databases/*}/documents:write"
185185
body: "*"
186186
};
187187
}
188188

189-
// Listens to changes. This method is only available via the gRPC API (not
190-
// REST).
189+
// Listens to changes. This method is only available via gRPC or WebChannel
190+
// (not REST).
191191
rpc Listen(stream ListenRequest) returns (stream ListenResponse) {
192192
option (google.api.http) = {
193193
post: "/v1/{database=projects/*/databases/*}/documents:listen"
@@ -655,7 +655,14 @@ message RunAggregationQueryResponse {
655655
// a new transaction.
656656
bytes transaction = 2;
657657

658-
// The time at which the aggregate value is valid for.
658+
// The time at which the aggregate result was computed. This is always
659+
// monotonically increasing; in this case, the previous AggregationResult in
660+
// the result stream are guaranteed not to have changed between their
661+
// `read_time` and this one.
662+
//
663+
// If the query returns no results, a response with `read_time` and no
664+
// `result` will be sent, and this represents the time at which the query
665+
// was run.
659666
google.protobuf.Timestamp read_time = 3;
660667
}
661668

google/firestore/v1/query.proto

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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].
351358
message 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
// );

google/firestore/v1/write.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.

0 commit comments

Comments
 (0)