MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / retrieve

Method retrieve

src/storage/rocksdb.cpp:138–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void RocksDBStorageProvider::retrieve(const char *key, size_t cchKey, callbackSingle fn) const
139{
140 rocksdb::PinnableSlice slice;
141 std::string prefixed_key = prefixKey(key, cchKey);
142 auto status = m_spdb->Get(ReadOptions(), m_spcolfamily.get(), rocksdb::Slice(prefixed_key), &slice);
143 if (status.ok())
144 fn(key, cchKey, slice.data(), slice.size());
145}
146
147size_t RocksDBStorageProvider::clear()
148{

Callers

nothing calls this directly

Calls 6

prefixKeyFunction · 0.85
GetMethod · 0.80
okMethod · 0.80
dataMethod · 0.80
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected