| 193 | } |
| 194 | |
| 195 | ThreadFuture<Standalone<VectorRef<const char*>>> DLTransaction::getAddressesForKey(const KeyRef& key) { |
| 196 | FdbCApi::FDBFuture* f = api->transactionGetAddressesForKey(tr, key.begin(), key.size()); |
| 197 | |
| 198 | return toThreadFuture<Standalone<VectorRef<const char*>>>(api, f, [](FdbCApi::FDBFuture* f, FdbCApi* api) { |
| 199 | const char** addresses; |
| 200 | int count; |
| 201 | FdbCApi::fdb_error_t error = api->futureGetStringArray(f, &addresses, &count); |
| 202 | ASSERT(!error); |
| 203 | |
| 204 | // The memory for this is stored in the FDBFuture and is released when the future gets destroyed |
| 205 | return Standalone<VectorRef<const char*>>(VectorRef<const char*>(addresses, count), Arena()); |
| 206 | }); |
| 207 | } |
| 208 | |
| 209 | ThreadFuture<Standalone<StringRef>> DLTransaction::getVersionstamp() { |
| 210 | if (!api->transactionGetVersionstamp) { |
nothing calls this directly
no test coverage detected