aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Local/FSTLocalStore.mm
diff options
context:
space:
mode:
authorGravatar zxu <zxu@google.com>2018-02-06 13:51:11 -0500
committerGravatar GitHub <noreply@github.com>2018-02-06 13:51:11 -0500
commita441190635d494f128cf02e07566ae2003af4e08 (patch)
tree618e6b0ecdb5d243f6e97f319f98f09dc9ca0a7e /Firestore/Source/Local/FSTLocalStore.mm
parent7cac9dc47a8c6b7321ebf5fc13fa7140e784c8ca (diff)
Implement Firestore DatabaseInfo and port both Database{Id,Info} C++ to the iOS code (#738)
* implement Firestore DatabaseInfo in C++ * temporary stash changes; blocking on the massive renaming of .m to .mm * add database_info_test to project * finish port DatabaseId and fix style, modular fixing DatabaseInfo * port DatabaseInfo * remove FSTDatabase{ID,Info} and their tests from project * fix unit test * use namespace alias * use namespace alias, leftover * address more changes * refactoring to use raw pointer instead of value for property * address changes * remove self-> * fix style * remove the name suffix Alloc * fix a bug
Diffstat (limited to 'Firestore/Source/Local/FSTLocalStore.mm')
-rw-r--r--Firestore/Source/Local/FSTLocalStore.mm10
1 files changed, 5 insertions, 5 deletions
diff --git a/Firestore/Source/Local/FSTLocalStore.mm b/Firestore/Source/Local/FSTLocalStore.mm
index fa77e37..d30177a 100644
--- a/Firestore/Source/Local/FSTLocalStore.mm
+++ b/Firestore/Source/Local/FSTLocalStore.mm
@@ -43,6 +43,8 @@
#include "Firestore/core/src/firebase/firestore/core/target_id_generator.h"
+using firebase::firestore::core::TargetIdGenerator;
+
NS_ASSUME_NONNULL_BEGIN
@interface FSTLocalStore ()
@@ -92,7 +94,7 @@ NS_ASSUME_NONNULL_BEGIN
@implementation FSTLocalStore {
/** Used to generate targetIDs for queries tracked locally. */
- firebase::firestore::core::TargetIdGenerator _targetIDGenerator;
+ TargetIdGenerator _targetIDGenerator;
}
- (instancetype)initWithPersistence:(id<FSTPersistence>)persistence
@@ -115,8 +117,7 @@ NS_ASSUME_NONNULL_BEGIN
_targetIDs = [NSMutableDictionary dictionary];
_heldBatchResults = [NSMutableArray array];
- _targetIDGenerator =
- firebase::firestore::core::TargetIdGenerator::LocalStoreTargetIdGenerator(0);
+ _targetIDGenerator = TargetIdGenerator::LocalStoreTargetIdGenerator(0);
}
return self;
}
@@ -154,8 +155,7 @@ NS_ASSUME_NONNULL_BEGIN
[self.queryCache start];
FSTTargetID targetID = [self.queryCache highestTargetID];
- _targetIDGenerator =
- firebase::firestore::core::TargetIdGenerator::LocalStoreTargetIdGenerator(targetID);
+ _targetIDGenerator = TargetIdGenerator::LocalStoreTargetIdGenerator(targetID);
FSTListenSequenceNumber sequenceNumber = [self.queryCache highestListenSequenceNumber];
self.listenSequence = [[FSTListenSequence alloc] initStartingAfter:sequenceNumber];
}