diff options
author | zxu <zxu@google.com> | 2018-03-05 11:30:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-05 11:30:59 -0500 |
commit | 1c40e7aada6b32bbc621f06fb5f380149606a58d (patch) | |
tree | 6dee81f74f8a33d1beae915d9227caf28b8e2598 /Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm | |
parent | 9b5b4d876eb77e65b3246614855088be101eebf3 (diff) |
add converters and port paths to FSTQuery (#869)
* add converters and fix FSTQuery.{h,m} only
* address changes
* a change forget to address
* add a dummy function to make inline-only-library buildable
Diffstat (limited to 'Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm')
-rw-r--r-- | Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm index 9bbc047..7d5e1e2 100644 --- a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm +++ b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm @@ -60,10 +60,11 @@ NS_ASSUME_NONNULL_BEGIN // Documents are ordered by key, so we can use a prefix scan to narrow down the documents // we need to match the query against. - FSTDocumentKey *prefix = [FSTDocumentKey keyWithPath:[query.path pathByAppendingSegment:@""]]; + FSTDocumentKey *prefix = [FSTDocumentKey + keyWithPath:[FSTResourcePath resourcePathWithCPPResourcePath:query.path.Append("")]]; NSEnumerator<FSTDocumentKey *> *enumerator = [self.docs keyEnumeratorFrom:prefix]; for (FSTDocumentKey *key in enumerator) { - if (![query.path isPrefixOfPath:key.path]) { + if (!query.path.IsPrefixOf([key.path toCPPResourcePath])) { break; } FSTMaybeDocument *maybeDoc = self.docs[key]; |