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 should accept Protobuf and Firestore Value(s) #3315

Closed
sgammon opened this issue May 28, 2018 · 2 comments
Closed

Firestore should accept Protobuf and Firestore Value(s) #3315

sgammon opened this issue May 28, 2018 · 2 comments
Assignees
Labels
api: firestore Issues related to the Firestore API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@sgammon
Copy link

sgammon commented May 28, 2018

Currently, the Firestore SDK provides the following interfaces for set(/update(/etc, w.r.t. write batches and writing in general (parameters irrelevant to this ticket omitted):

  • Add via Java: set(..., Map<String, Object> fields, ...)
  • Add via POJO: set(..., Object pojo, ...)

These are great for a lot of use cases. But, those underlying methods immediately serialize everything to com.google.firestore.v1beta1.Value objects.

If your application would like more control over the Value(s) selected during serialization, why can't you provide your object via set(..., Map<String, com.google.firestore.v1beta1.Value>)?

I'd like to request that such an interface be added. Or, another way to do it would be to accept Protobuf's regular Value well-known-type. However, it seems as though it reflects a subset of Firestore's types (i.e. setNumberValue where Firestore has setDoubleValue, setIntegerValue, etc) so I understand why that particular type wrapper was not used.

Thank you in advance

@sgammon
Copy link
Author

sgammon commented May 28, 2018

To the Firestore SDK authors - in general, it's rather difficult to find quick-start docs for the gRPC client. I wasn't able to get it to work. I find it's hard to work with Google tech when using Protobuf which is strange - surely there must be an easy way to take a Message/GeneratedMessage and store it in Firestore?

@yihanzhen yihanzhen added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. api: firestore Issues related to the Firestore API. labels May 30, 2018
@daltonj
Copy link

daltonj commented Aug 9, 2018

Is there any update on this? I would like to upvote this request.

Given that protos are Google standard, I would hope and expect them to work together well.

@sduskis sduskis removed the priority: p2 Moderately-important priority. Fix may not be included in next release. label Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the Firestore API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

5 participants