MCPcopy Create free account
hub / github.com/apple/foundationdb / getKey

Method getKey

fdbclient/MultiVersionTransaction.actor.cpp:90–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90ThreadFuture<Key> DLTransaction::getKey(const KeySelectorRef& key, bool snapshot) {
91 FdbCApi::FDBFuture* f =
92 api->transactionGetKey(tr, key.getKey().begin(), key.getKey().size(), key.orEqual, key.offset, snapshot);
93
94 return toThreadFuture<Key>(api, f, [](FdbCApi::FDBFuture* f, FdbCApi* api) {
95 const uint8_t* key;
96 int keyLength;
97 FdbCApi::fdb_error_t error = api->futureGetKey(f, &key, &keyLength);
98 ASSERT(!error);
99
100 // The memory for this is stored in the FDBFuture and is released when the future gets destroyed
101 return Key(KeyRef(key, keyLength), Arena());
102 });
103}
104
105ThreadFuture<RangeResult> DLTransaction::getRange(const KeySelectorRef& begin,
106 const KeySelectorRef& end,

Callers

nothing calls this directly

Calls 8

KeyRefClass · 0.85
getTransactionFunction · 0.85
abortableFutureFunction · 0.85
getKeyMethod · 0.65
KeyClass · 0.50
ArenaClass · 0.50
beginMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected