aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Local/FSTLocalDocumentsView.mm
diff options
context:
space:
mode:
authorGravatar zxu <zxu@google.com>2018-03-06 14:28:04 -0500
committerGravatar GitHub <noreply@github.com>2018-03-06 14:28:04 -0500
commit8311c6432ecff78bedd13e27f64d241659324786 (patch)
tree982484ba69cf17172ee4e1308254a0b76894b7d5 /Firestore/Source/Local/FSTLocalDocumentsView.mm
parent34ebf10b0acc65f1924d723e82085d4104bc281d (diff)
port paths to FSTDocumentKey (#877)
* replace path with C++ implementation in FSTDocumentKey.{h,mm} only * address changes * address changes
Diffstat (limited to 'Firestore/Source/Local/FSTLocalDocumentsView.mm')
-rw-r--r--Firestore/Source/Local/FSTLocalDocumentsView.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Firestore/Source/Local/FSTLocalDocumentsView.mm b/Firestore/Source/Local/FSTLocalDocumentsView.mm
index 4bcdf47..0059e28 100644
--- a/Firestore/Source/Local/FSTLocalDocumentsView.mm
+++ b/Firestore/Source/Local/FSTLocalDocumentsView.mm
@@ -75,7 +75,7 @@ NS_ASSUME_NONNULL_BEGIN
}
- (FSTDocumentDictionary *)documentsMatchingQuery:(FSTQuery *)query {
- if ([FSTDocumentKey isDocumentKey:[FSTResourcePath resourcePathWithCPPResourcePath:query.path]]) {
+ if ([FSTDocumentKey isDocumentKey:query.path]) {
return [self documentsMatchingDocumentQuery:[FSTResourcePath
resourcePathWithCPPResourcePath:query.path]];
} else {
@@ -86,7 +86,8 @@ NS_ASSUME_NONNULL_BEGIN
- (FSTDocumentDictionary *)documentsMatchingDocumentQuery:(FSTResourcePath *)docPath {
FSTDocumentDictionary *result = [FSTDocumentDictionary documentDictionary];
// Just do a simple document lookup.
- FSTMaybeDocument *doc = [self documentForKey:[FSTDocumentKey keyWithPath:docPath]];
+ FSTMaybeDocument *doc =
+ [self documentForKey:[FSTDocumentKey keyWithPath:[docPath toCPPResourcePath]]];
if ([doc isKindOfClass:[FSTDocument class]]) {
result = [result dictionaryBySettingObject:(FSTDocument *)doc forKey:doc.key];
}