diff options
Diffstat (limited to 'Firestore')
-rw-r--r-- | Firestore/Source/API/FIRQuery+Internal.h | 2 | ||||
-rw-r--r-- | Firestore/Source/API/FIRQuery.m | 15 |
2 files changed, 4 insertions, 13 deletions
diff --git a/Firestore/Source/API/FIRQuery+Internal.h b/Firestore/Source/API/FIRQuery+Internal.h index b443c2f..3c2b2a7 100644 --- a/Firestore/Source/API/FIRQuery+Internal.h +++ b/Firestore/Source/API/FIRQuery+Internal.h @@ -23,8 +23,6 @@ NS_ASSUME_NONNULL_BEGIN /** Internal FIRQuery API we don't want exposed in our public header files. */ @interface FIRQuery (Internal) + (FIRQuery *)referenceWithQuery:(FSTQuery *)query firestore:(FIRFirestore *)firestore; -- (FIRQuery *)queryFilteredUsingComparisonPredicate:(NSPredicate *)predicate; -- (FIRQuery *)queryFilteredUsingCompoundPredicate:(NSPredicate *)predicate; @property(nonatomic, strong, readonly) FSTQuery *query; @end diff --git a/Firestore/Source/API/FIRQuery.m b/Firestore/Source/API/FIRQuery.m index 70bd51e..bb1599a 100644 --- a/Firestore/Source/API/FIRQuery.m +++ b/Firestore/Source/API/FIRQuery.m @@ -259,9 +259,7 @@ addSnapshotListenerInternalWithOptions:(FSTListenOptions *)internalOptions - (FIRQuery *)queryFilteredUsingComparisonPredicate:(NSPredicate *)predicate { NSComparisonPredicate *comparison = (NSComparisonPredicate *)predicate; if (comparison.comparisonPredicateModifier != NSDirectPredicateModifier) { - FSTThrowInvalidArgument( - @"Invalid query. Predicate cannot have an " - "aggregate modifier."); + FSTThrowInvalidArgument(@"Invalid query. Predicate cannot have an aggregate modifier."); } NSString *path; id value = nil; @@ -301,15 +299,12 @@ addSnapshotListenerInternalWithOptions:(FSTListenOptions *)internalOptions } } else { FSTThrowInvalidArgument( - @"Invalid query. Predicate comparisons must " - "include a key path and a constant."); + @"Invalid query. Predicate comparisons must include a key path and a constant."); } // Fallback cases of unsupported comparison operator. switch (comparison.predicateOperatorType) { case NSCustomSelectorPredicateOperatorType: - FSTThrowInvalidArgument( - @"Invalid query. Custom predicate filters are " - "not supported."); + FSTThrowInvalidArgument(@"Invalid query. Custom predicate filters are not supported."); break; default: FSTThrowInvalidArgument(@"Invalid query. Operator type %lu is not supported.", @@ -320,9 +315,7 @@ addSnapshotListenerInternalWithOptions:(FSTListenOptions *)internalOptions - (FIRQuery *)queryFilteredUsingCompoundPredicate:(NSPredicate *)predicate { NSCompoundPredicate *compound = (NSCompoundPredicate *)predicate; if (compound.compoundPredicateType != NSAndPredicateType || compound.subpredicates.count == 0) { - FSTThrowInvalidArgument( - @"Invalid query. Only compound queries using AND " - "are supported."); + FSTThrowInvalidArgument(@"Invalid query. Only compound queries using AND are supported."); } FIRQuery *query = self; for (NSPredicate *pred in compound.subpredicates) { |