Skip to content

Commit

Permalink
feat: add ApiScope and COLLECTION_RECURSIVE query_scope for Firestore…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored May 18, 2023
1 parent 96b1d2a commit b671452
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
32 changes: 25 additions & 7 deletions dev/protos/google/firestore/admin/v1/index.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -50,6 +50,21 @@ message Index {
// against all collections that has the collection id specified by the
// index.
COLLECTION_GROUP = 2;

// Include all the collections's ancestor in the index. Only available for
// Datastore Mode databases.
COLLECTION_RECURSIVE = 3;
}

// API Scope defines the APIs (Firestore Native, or Firestore in
// Datastore Mode) that are supported for queries.
enum ApiScope {
// The index can only be used by the Firestore Native query API.
// This is the default.
ANY_API = 0;

// The index can only be used by the Firestore in Datastore Mode query API.
DATASTORE_MODE_API = 1;
}

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

// The API scope supported by this index.
ApiScope api_scope = 5;

// The fields supported by this index.
//
// For composite indexes, this is always 2 or more fields.
// The last field entry is always for the field path `__name__`. If, on
// creation, `__name__` was not specified as the last field, it will be added
// automatically with the same direction as that of the last field defined. If
// the final field in a composite index is not directional, the `__name__`
// will be ordered ASCENDING (unless explicitly specified).
// For composite indexes, this requires a minimum of 2 and a maximum of 100
// fields. The last field entry is always for the field path `__name__`. If,
// on creation, `__name__` was not specified as the last field, it will be
// added automatically with the same direction as that of the last field
// defined. If the final field in a composite index is not directional, the
// `__name__` will be ordered ASCENDING (unless explicitly specified).
//
// For single field indexes, this will always be exactly one entry with a
// field path equal to the field path of the associated field.
Expand Down
3 changes: 2 additions & 1 deletion dev/protos/google/protobuf/any.proto
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ message Any {
//
// Note: this functionality is not currently available in the official
// protobuf release, and it is not used for type URLs beginning with
// type.googleapis.com.
// type.googleapis.com. As of May 2023, there are no widely used type server
// implementations and no plans to implement one.
//
// Schemes other than `http`, `https` (or the empty scheme) might be
// used with implementation specific semantics.
Expand Down
7 changes: 3 additions & 4 deletions dev/protos/google/protobuf/descriptor.proto
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,9 @@ message ExtensionRangeOptions {
optional bool repeated = 6;
}

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

// The verification state of the extension range.
Expand Down

0 comments on commit b671452

Please sign in to comment.