aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Example/Tests/Util
diff options
context:
space:
mode:
authorGravatar Michael Lehenbauer <mikelehen@gmail.com>2018-04-23 10:03:55 -0700
committerGravatar GitHub <noreply@github.com>2018-04-23 10:03:55 -0700
commite4384c3e809556e75907df74cd116307f397472f (patch)
tree98841eba1d45eb94adcb798b6f792c16ba4b8d18 /Firestore/Example/Tests/Util
parent8e70791465f9b5e4bb75dfc18de4a4ed90961974 (diff)
Array Contains Queries (not added to public headers yet). (#1138)
Diffstat (limited to 'Firestore/Example/Tests/Util')
-rw-r--r--Firestore/Example/Tests/Util/FSTHelpers.h2
-rw-r--r--Firestore/Example/Tests/Util/FSTHelpers.mm2
2 files changed, 3 insertions, 1 deletions
diff --git a/Firestore/Example/Tests/Util/FSTHelpers.h b/Firestore/Example/Tests/Util/FSTHelpers.h
index 9b5f96a..131da2d 100644
--- a/Firestore/Example/Tests/Util/FSTHelpers.h
+++ b/Firestore/Example/Tests/Util/FSTHelpers.h
@@ -212,7 +212,7 @@ FSTQuery *FSTTestQuery(const absl::string_view path);
/**
* A convenience method to create a FSTFilter using a string representation for both field
- * and operator (<, <=, ==, >=, >).
+ * and operator (<, <=, ==, >=, >, array_contains).
*/
id<FSTFilter> FSTTestFilter(const absl::string_view field, NSString *op, id value);
diff --git a/Firestore/Example/Tests/Util/FSTHelpers.mm b/Firestore/Example/Tests/Util/FSTHelpers.mm
index e1ed18c..888a45f 100644
--- a/Firestore/Example/Tests/Util/FSTHelpers.mm
+++ b/Firestore/Example/Tests/Util/FSTHelpers.mm
@@ -210,6 +210,8 @@ id<FSTFilter> FSTTestFilter(const absl::string_view field, NSString *opString, i
op = FSTRelationFilterOperatorGreaterThanOrEqual;
} else if ([opString isEqualToString:@">"]) {
op = FSTRelationFilterOperatorGreaterThan;
+ } else if ([opString isEqualToString:@"array_contains"]) {
+ op = FSTRelationFilterOperatorArrayContains;
} else {
FSTCFail(@"Unsupported operator type: %@", opString);
}