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
feat(firestore): Added support for multiple databases #20029
Conversation
ca214e3
to
f0dbd90
Compare
5354ed0
to
b10eba4
Compare
b10eba4
to
ba67940
Compare
@@ -48,7 +50,7 @@ def firestore | |||
config.endpoint = host if host | |||
config.lib_name = "gccl" | |||
config.lib_version = Google::Cloud::Firestore::VERSION | |||
config.metadata = { "google-cloud-resource-prefix": "projects/#{@project}/databases/(default)" } | |||
config.metadata = { "google-cloud-resource-prefix": "projects/#{@project}/databases/#{@database}" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if @database
is nil?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error will be thrown in this case. But @database
can be nil only if the user explicity initialize an object of Service
class, which is marked as private, and use it for sending requests.
While initializing the firestore client, @database
will have the the value (default)
unless overridden by the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.