Skip to content

Commit b671452

Browse files
feat: add ApiScope and COLLECTION_RECURSIVE query_scope for Firestore index (#1849)
* feat: add ApiScope and COLLECTION_RECURSIVE query_scope for Firestore index PiperOrigin-RevId: 532955594 Source-Link: googleapis/googleapis@b4bb0e2 Source-Link: googleapis/googleapis-gen@57104e2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTcxMDRlMmEwOGI3N2Q3YzVmMzllYjViOTcyY2U5ODFkNzgyMjQ0NSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 96b1d2a commit b671452

File tree

3 files changed

+30
-12
lines changed

3 files changed

+30
-12
lines changed

dev/protos/google/firestore/admin/v1/index.proto

+25-7
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.
@@ -50,6 +50,21 @@ message Index {
5050
// against all collections that has the collection id specified by the
5151
// index.
5252
COLLECTION_GROUP = 2;
53+
54+
// Include all the collections's ancestor in the index. Only available for
55+
// Datastore Mode databases.
56+
COLLECTION_RECURSIVE = 3;
57+
}
58+
59+
// API Scope defines the APIs (Firestore Native, or Firestore in
60+
// Datastore Mode) that are supported for queries.
61+
enum ApiScope {
62+
// The index can only be used by the Firestore Native query API.
63+
// This is the default.
64+
ANY_API = 0;
65+
66+
// The index can only be used by the Firestore in Datastore Mode query API.
67+
DATASTORE_MODE_API = 1;
5368
}
5469

5570
// A field in an index.
@@ -138,14 +153,17 @@ message Index {
138153
// time, and that have the same collection id as this index.
139154
QueryScope query_scope = 2;
140155

156+
// The API scope supported by this index.
157+
ApiScope api_scope = 5;
158+
141159
// The fields supported by this index.
142160
//
143-
// For composite indexes, this is always 2 or more fields.
144-
// The last field entry is always for the field path `__name__`. If, on
145-
// creation, `__name__` was not specified as the last field, it will be added
146-
// automatically with the same direction as that of the last field defined. If
147-
// the final field in a composite index is not directional, the `__name__`
148-
// will be ordered ASCENDING (unless explicitly specified).
161+
// For composite indexes, this requires a minimum of 2 and a maximum of 100
162+
// fields. The last field entry is always for the field path `__name__`. If,
163+
// on creation, `__name__` was not specified as the last field, it will be
164+
// added automatically with the same direction as that of the last field
165+
// defined. If the final field in a composite index is not directional, the
166+
// `__name__` will be ordered ASCENDING (unless explicitly specified).
149167
//
150168
// For single field indexes, this will always be exactly one entry with a
151169
// field path equal to the field path of the associated field.

dev/protos/google/protobuf/any.proto

+2-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ message Any {
149149
//
150150
// Note: this functionality is not currently available in the official
151151
// protobuf release, and it is not used for type URLs beginning with
152-
// type.googleapis.com.
152+
// type.googleapis.com. As of May 2023, there are no widely used type server
153+
// implementations and no plans to implement one.
153154
//
154155
// Schemes other than `http`, `https` (or the empty scheme) might be
155156
// used with implementation specific semantics.

dev/protos/google/protobuf/descriptor.proto

+3-4
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,9 @@ message ExtensionRangeOptions {
159159
optional bool repeated = 6;
160160
}
161161

162-
// go/protobuf-stripping-extension-declarations
163-
// Like Metadata, but we use a repeated field to hold all extension
164-
// declarations. This should avoid the size increases of transforming a large
165-
// extension range into small ranges in generated binaries.
162+
// For external users: DO NOT USE. We are in the process of open sourcing
163+
// extension declaration and executing internal cleanups before it can be
164+
// used externally.
166165
repeated Declaration declaration = 2 [retention = RETENTION_SOURCE];
167166

168167
// The verification state of the extension range.

0 commit comments

Comments
 (0)