| 88 | } |
| 89 | |
| 90 | ThreadFuture<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 | |
| 105 | ThreadFuture<RangeResult> DLTransaction::getRange(const KeySelectorRef& begin, |
| 106 | const KeySelectorRef& end, |
nothing calls this directly
no test coverage detected