Skip to content

Commit 265d06a

Browse files
committed
Rename document_name
1 parent 11bbbd7 commit 265d06a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Firestore/core/src/local/leveldb_key.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,14 +1202,14 @@ std::string LevelDbIndexEntryKey::Key(int32_t index_id,
12021202
absl::string_view user_id,
12031203
absl::string_view array_value,
12041204
absl::string_view dicrectional_value,
1205-
absl::string_view document_name) {
1205+
absl::string_view document_key) {
12061206
Writer writer;
12071207
writer.WriteTableName(kIndexEntriesTable);
12081208
writer.WriteIndexId(index_id);
12091209
writer.WriteUserId(user_id);
12101210
writer.WriteIndexArrayValue(array_value);
12111211
writer.WriteIndexDirectionalValue(dicrectional_value);
1212-
writer.WriteDocumentId(document_name);
1212+
writer.WriteDocumentId(document_key);
12131213
writer.WriteTerminator();
12141214
return writer.result();
12151215
}
@@ -1221,7 +1221,7 @@ bool LevelDbIndexEntryKey::Decode(absl::string_view key) {
12211221
user_id_ = reader.ReadUserId();
12221222
array_value_ = reader.ReadIndexArrayValue();
12231223
directional_value_ = reader.ReadIndexDirectionalValue();
1224-
document_name_ = reader.ReadDocumentId();
1224+
document_key_ = reader.ReadDocumentId();
12251225
reader.ReadTerminator();
12261226
return reader.ok();
12271227
}

Firestore/core/src/local/leveldb_key.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -861,17 +861,17 @@ class LevelDbIndexEntryKey {
861861
return directional_value_;
862862
}
863863

864-
/** The document name this entry points to. */
865-
const std::string& document_name() const {
866-
return document_name_;
864+
/** The document key this entry points to. */
865+
const std::string& document_key() const {
866+
return document_key_;
867867
}
868868

869869
private:
870870
int32_t index_id_;
871871
std::string user_id_;
872872
std::string array_value_;
873873
std::string directional_value_;
874-
std::string document_name_;
874+
std::string document_key_;
875875
};
876876

877877
} // namespace local

Firestore/core/test/unit/local/leveldb_key_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ TEST(IndexEntryKeyTest, EncodeDecodeCycle) {
626626
ASSERT_EQ(entry.user_id, key.user_id());
627627
ASSERT_EQ(entry.array_value, key.array_value());
628628
ASSERT_EQ(entry.dir_value, key.directional_value());
629-
ASSERT_EQ(entry.document_name, key.document_name());
629+
ASSERT_EQ(entry.document_name, key.document_key());
630630
}
631631
}
632632

0 commit comments

Comments
 (0)