Firestore should accept Protobuf and Firestore Value(s) #3315
Labels
api: firestore
Issues related to the Firestore API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
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):set(..., Map<String, Object> fields, ...)
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 viaset(..., 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 hassetDoubleValue
,setIntegerValue
, etc) so I understand why that particular type wrapper was not used.Thank you in advance
The text was updated successfully, but these errors were encountered: