diff options
author | zxu <zxu@google.com> | 2018-03-16 15:42:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-16 15:42:05 -0400 |
commit | 4e7296b080b9c8cea13e5e5eeee65f4312fb5e8a (patch) | |
tree | 87f175b1e1ac74632fee2ff7c52ccb9b5bc78014 /Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm | |
parent | 1395c8202b236188b9e4e1bfc2a3e00244179593 (diff) |
port `DocumentKey` to non-container types of `Model/*` (#930)
* 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
* add converter function between two DocumentKey implementations
* add unit test
* address changes
* fix lint
* using DocumentKey in model except for the container types `FSTDocumentDictionary`, `FSTDocumentKeySet`, and `FSTDocumentVersionDictionary`
* change other place w.r.t. the use of `DocumentKey` in model
* update parameter of test helpers from NSString to string_view
* revert a temporary change used in debug
* address changes
Diffstat (limited to 'Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm')
-rw-r--r-- | Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm index c86318d..97f0ef1 100644 --- a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm +++ b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm @@ -111,7 +111,7 @@ static ReadOptions StandardReadOptions() { for (; it->Valid() && [currentKey decodeKey:it->key()]; it->Next()) { FSTMaybeDocument *maybeDoc = [self decodedMaybeDocument:it->value() withKey:currentKey.documentKey]; - if (!query.path.IsPrefixOf(maybeDoc.key.path)) { + if (!query.path.IsPrefixOf(maybeDoc.key.path())) { break; } else if ([maybeDoc isKindOfClass:[FSTDocument class]]) { results = [results dictionaryBySettingObject:(FSTDocument *)maybeDoc forKey:maybeDoc.key]; @@ -143,8 +143,8 @@ static ReadOptions StandardReadOptions() { FSTMaybeDocument *maybeDocument = [self.serializer decodedMaybeDocument:proto]; FSTAssert([maybeDocument.key isEqualToKey:documentKey], - @"Read document has key (%@) instead of expected key (%@).", maybeDocument.key, - documentKey); + @"Read document has key (%s) instead of expected key (%@).", + maybeDocument.key.ToString().c_str(), documentKey); return maybeDocument; } |