From 920cfbfa998ca9d04cce5f7731aced7e950a3477 Mon Sep 17 00:00:00 2001 From: rsgowman Date: Fri, 13 Jul 2018 16:22:07 -0400 Subject: Initial (incomplete) implementation of f:f:core::Filter (#1495) And RelationFilter subclass. Used to implement the next step in core::Query. --- Firestore/core/src/firebase/firestore/model/field_value.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Firestore/core/src/firebase/firestore/model/field_value.h') diff --git a/Firestore/core/src/firebase/firestore/model/field_value.h b/Firestore/core/src/firebase/firestore/model/field_value.h index 09c8531..697d5b3 100644 --- a/Firestore/core/src/firebase/firestore/model/field_value.h +++ b/Firestore/core/src/firebase/firestore/model/field_value.h @@ -108,6 +108,15 @@ class FieldValue { return tag_; } + /** + * PORTING NOTE: This deviates from the other platforms that define TypeOrder. + * Since we already define Type for union types, we use it together with this + * function to achieve the equivalent order of types i.e. + * i) if two types are comparable, then they are of equal order; + * ii) otherwise, their order is the same as the order of their Type. + */ + static bool Comparable(Type lhs, Type rhs); + bool boolean_value() const { HARD_ASSERT(tag_ == Type::Boolean); return boolean_value_; -- cgit v1.2.3