feat: add isType expression#2329
Conversation
Adds the `isType` expression, and the `Type` enum, which contains all the types that the Firestore backend can generate. Question: The `DocumentChange` class defines a `Type` enum that represents all snapshot diff types. Is it okay to have these two enum types in the SDK?
yvonnep165
left a comment
There was a problem hiding this comment.
For the Type enum question, I would say ok to have the two enum types in the SDK. But I'm not 100% confident to say so. Will rely on Mila's opinion. Everything else looks good to me!
Good question, my gut says no, cause it is not a good practice to have 2 APIs of the same name and expect users to use prefix to differentiate them. Please use a more descriptive naming for this, maybe like |
milaGGL
left a comment
There was a problem hiding this comment.
LGTM. Good catch on the duplicated enum "Type".
Adds support for `isType` pipeline expression. Ported from: googleapis/java-firestore#2329
Adds support for `isType` pipeline expression. Ported from: googleapis/java-firestore#2329
Adds the
isTypeexpression, and theTypeenum, which contains all the types that the Firestore backend can generate.Question: The
DocumentChange(DocumentChange.java) class already defines aTypeenum that represents all snapshot diff types. Is it okay to have these two enum types in the SDK? I believe most users would use this type asDocumentChange.Typerather than justType, so there should be no name collisions.