Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firestore API: Add COLLECTION_GROUP to queryScope #1920

Conversation

btorresgil
Copy link
Contributor

Collection group scope was recently added to Cloud Firestore indexes.

Here is an example of one pulled with gcloud CLI:

$ gcloud beta firestore indexes composite describe CICAgJim12AF
┌──────────────┬──────────────────┬──────────────────┬───────┬─────────────┬───────────┬──────────────┐
│     NAME     │ COLLECTION_GROUP │   QUERY_SCOPE    │ STATE │ FIELD_PATHS │   ORDER   │ ARRAY_CONFIG │
├──────────────┼──────────────────┼──────────────────┼───────┼─────────────┼───────────┼──────────────┤
│ CICAgJim12AF │ mycollection     │ COLLECTION_GROUP │ READY │ userId      │ ASCENDING │              │
│              │                  │                  │       │ myList      │           │ CONTAINS     │
└──────────────┴──────────────────┴──────────────────┴───────┴─────────────┴───────────┴──────────────┘

Notice that QUERY_SCOPE has a value of COLLECTION_GROUP which is a valid option for this parameter.

See also Firestore release notes for May 7 2019: https://cloud.google.com/firestore/docs/release-notes

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review. They will authorize it to run through our CI pipeline, which will generate downstream PRs.

Thanks for your contribution! A human will be with you soon.

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Do you mind updating the description

The scope at which a query is run. Defaults to `"COLLECTION"`.

to this?

The scope at which a query is run. One of `"COLLECTION"` or `"COLLECTION_GROUP"`. Defaults to `"COLLECTION"`.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
This PR seems not to have generated downstream PRs before, as of 2a5aa3c27c9187106d37e8b145dbf10f506e3e0d.

Pull request statuses

No diff detected in terraform-google-conversion.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed.
depends: hashicorp/terraform-provider-google-beta#919
depends: hashicorp/terraform-provider-google#3972

@rileykarson rileykarson force-pushed the firestore-collection-group branch from 2a5aa3c to ab44cd8 Compare August 14, 2019 21:43
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, ab44cd8.

Pull request statuses

No diff detected in terraform-google-conversion.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed.
depends: hashicorp/terraform-provider-google-beta#1048
depends: hashicorp/terraform-provider-google#4258

Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
@modular-magician modular-magician merged commit ad8a5af into GoogleCloudPlatform:master Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants