MCPcopy Create free account
hub / github.com/apache/kvrocks / GetSubKeyIterator

Method GetSubKeyIterator

src/storage/iterator.cc:104–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104std::unique_ptr<SubKeyIterator> DBIterator::GetSubKeyIterator() const {
105 if (!Valid()) {
106 return nullptr;
107 }
108
109 RedisType type = metadata_.Type();
110 if (type == kRedisNone || metadata_.IsSingleKVType()) {
111 return nullptr;
112 }
113
114 auto prefix = InternalKey(Key(), "", metadata_.version, ctx_->storage->IsSlotIdEncoded()).Encode();
115 return std::make_unique<SubKeyIterator>(*ctx_, read_options_, type, std::move(prefix));
116}
117
118SubKeyIterator::SubKeyIterator(engine::Context &ctx, rocksdb::ReadOptions read_options, RedisType type,
119 std::string prefix)

Callers 3

CopyMethod · 0.80
sendSnapshotByRawKVMethod · 0.80
TEST_FFunction · 0.80

Calls 5

InternalKeyClass · 0.85
IsSingleKVTypeMethod · 0.80
IsSlotIdEncodedMethod · 0.80
TypeMethod · 0.45
EncodeMethod · 0.45

Tested by 1

TEST_FFunction · 0.64