diff options
author | zxu <zxu@google.com> | 2018-03-27 14:33:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-27 14:33:39 -0400 |
commit | cb8c4b6b1f1ad213a5b3272e2c2e94f755bbabf9 (patch) | |
tree | eb3eeddefb5fca423f59432933721d6d47100aa5 /Firestore/Source/API/FIRCollectionReference.mm | |
parent | a335d78a62c213b1ae6465bad28aaedfafd828bc (diff) |
port C++ DocumentKey to the rest of Firestore code (#977)
* port C++ DocumentKey to API's and Core's
* address changes
* address changes
* fix Hash return types
Diffstat (limited to 'Firestore/Source/API/FIRCollectionReference.mm')
-rw-r--r-- | Firestore/Source/API/FIRCollectionReference.mm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Firestore/Source/API/FIRCollectionReference.mm b/Firestore/Source/API/FIRCollectionReference.mm index dfd06c9..3f1559e 100644 --- a/Firestore/Source/API/FIRCollectionReference.mm +++ b/Firestore/Source/API/FIRCollectionReference.mm @@ -23,14 +23,15 @@ #import "Firestore/Source/API/FIRQuery+Internal.h" #import "Firestore/Source/API/FIRQuery_Init.h" #import "Firestore/Source/Core/FSTQuery.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Source/Util/FSTAssert.h" #import "Firestore/Source/Util/FSTUsageValidation.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/resource_path.h" #include "Firestore/core/src/firebase/firestore/util/string_apple.h" namespace util = firebase::firestore::util; +using firebase::firestore::model::DocumentKey; using firebase::firestore::model::ResourcePath; using firebase::firestore::util::CreateAutoId; @@ -99,7 +100,7 @@ NS_ASSUME_NONNULL_BEGIN if (parentPath.empty()) { return nil; } else { - FSTDocumentKey *key = [FSTDocumentKey keyWithPath:parentPath]; + DocumentKey key{parentPath}; return [FIRDocumentReference referenceWithKey:key firestore:self.firestore]; } } @@ -130,7 +131,7 @@ NS_ASSUME_NONNULL_BEGIN } - (FIRDocumentReference *)documentWithAutoID { - FSTDocumentKey *key = [FSTDocumentKey keyWithPath:self.query.path.Append(CreateAutoId())]; + const DocumentKey key{self.query.path.Append(CreateAutoId())}; return [FIRDocumentReference referenceWithKey:key firestore:self.firestore]; } |