aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Local/FSTLevelDBKey.mm
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/Source/Local/FSTLevelDBKey.mm')
-rw-r--r--Firestore/Source/Local/FSTLevelDBKey.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/Firestore/Source/Local/FSTLevelDBKey.mm b/Firestore/Source/Local/FSTLevelDBKey.mm
index 9850fff..41aea39 100644
--- a/Firestore/Source/Local/FSTLevelDBKey.mm
+++ b/Firestore/Source/Local/FSTLevelDBKey.mm
@@ -29,6 +29,7 @@ using firebase::firestore::util::OrderedCode;
using Firestore::StringView;
using leveldb::Slice;
+static const char *kVersionGlobalTable = "version";
static const char *kMutationsTable = "mutation";
static const char *kDocumentMutationsTable = "document_mutation";
static const char *kMutationQueuesTable = "mutation_queue";
@@ -448,6 +449,17 @@ NSString *InvalidKey(const Slice &key) {
@end
+@implementation FSTLevelDBVersionKey
+
++ (std::string)key {
+ std::string result;
+ WriteTableName(&result, kVersionGlobalTable);
+ WriteTerminator(&result);
+ return result;
+}
+
+@end
+
@implementation FSTLevelDBMutationKey {
std::string _userID;
}