aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Local/FSTLocalDocumentsView.mm
diff options
context:
space:
mode:
authorGravatar zxu <zxu@google.com>2018-03-14 08:57:31 -0400
committerGravatar GitHub <noreply@github.com>2018-03-14 08:57:31 -0400
commit9e815620e9f7f43b42e03db4e5118d7ad03ddee7 (patch)
tree86f362bad99281325fca7ee3ae116b6a0f36d511 /Firestore/Source/Local/FSTLocalDocumentsView.mm
parentd4d73ea53ecdf1e8ade3d00921419645dd5d66f7 (diff)
grand PR to port the remaining paths (FieldPath and ResourcePath). (#865)
* naively remove FSTPath import and source/test files. * port FieldPath, part I * port FieldPath, part II * port ResourcePath, part I * port ResourcePath, part II * the grand commit to fix build errors * use testutil:: helper instead of those from FSTHelpers * fix test and lint * use c_str in errmsg directly * fix * fix * make code clean * fix integration test I missed * fix to avoid naming collision in preprocessor * address changes * address changes * address changes * fix: fieldMask are actually shared with different context. * address changes * address changes
Diffstat (limited to 'Firestore/Source/Local/FSTLocalDocumentsView.mm')
-rw-r--r--Firestore/Source/Local/FSTLocalDocumentsView.mm13
1 files changed, 7 insertions, 6 deletions
diff --git a/Firestore/Source/Local/FSTLocalDocumentsView.mm b/Firestore/Source/Local/FSTLocalDocumentsView.mm
index 0059e28..c059146 100644
--- a/Firestore/Source/Local/FSTLocalDocumentsView.mm
+++ b/Firestore/Source/Local/FSTLocalDocumentsView.mm
@@ -25,9 +25,12 @@
#import "Firestore/Source/Model/FSTDocumentKey.h"
#import "Firestore/Source/Model/FSTMutation.h"
#import "Firestore/Source/Model/FSTMutationBatch.h"
-#import "Firestore/Source/Model/FSTPath.h"
#import "Firestore/Source/Util/FSTAssert.h"
+#include "Firestore/core/src/firebase/firestore/model/resource_path.h"
+
+using firebase::firestore::model::ResourcePath;
+
NS_ASSUME_NONNULL_BEGIN
@interface FSTLocalDocumentsView ()
@@ -76,18 +79,16 @@ NS_ASSUME_NONNULL_BEGIN
- (FSTDocumentDictionary *)documentsMatchingQuery:(FSTQuery *)query {
if ([FSTDocumentKey isDocumentKey:query.path]) {
- return [self documentsMatchingDocumentQuery:[FSTResourcePath
- resourcePathWithCPPResourcePath:query.path]];
+ return [self documentsMatchingDocumentQuery:query.path];
} else {
return [self documentsMatchingCollectionQuery:query];
}
}
-- (FSTDocumentDictionary *)documentsMatchingDocumentQuery:(FSTResourcePath *)docPath {
+- (FSTDocumentDictionary *)documentsMatchingDocumentQuery:(const ResourcePath &)docPath {
FSTDocumentDictionary *result = [FSTDocumentDictionary documentDictionary];
// Just do a simple document lookup.
- FSTMaybeDocument *doc =
- [self documentForKey:[FSTDocumentKey keyWithPath:[docPath toCPPResourcePath]]];
+ FSTMaybeDocument *doc = [self documentForKey:[FSTDocumentKey keyWithPath:docPath]];
if ([doc isKindOfClass:[FSTDocument class]]) {
result = [result dictionaryBySettingObject:(FSTDocument *)doc forKey:doc.key];
}