| 207 | } |
| 208 | |
| 209 | ThreadFuture<Standalone<StringRef>> DLTransaction::getVersionstamp() { |
| 210 | if (!api->transactionGetVersionstamp) { |
| 211 | return unsupported_operation(); |
| 212 | } |
| 213 | |
| 214 | FdbCApi::FDBFuture* f = api->transactionGetVersionstamp(tr); |
| 215 | |
| 216 | return toThreadFuture<Standalone<StringRef>>(api, f, [](FdbCApi::FDBFuture* f, FdbCApi* api) { |
| 217 | const uint8_t* str; |
| 218 | int strLength; |
| 219 | FdbCApi::fdb_error_t error = api->futureGetKey(f, &str, &strLength); |
| 220 | ASSERT(!error); |
| 221 | |
| 222 | // The memory for this is stored in the FDBFuture and is released when the future gets destroyed |
| 223 | return Standalone<StringRef>(StringRef(str, strLength), Arena()); |
| 224 | }); |
| 225 | } |
| 226 | |
| 227 | ThreadFuture<int64_t> DLTransaction::getEstimatedRangeSizeBytes(const KeyRangeRef& keys) { |
| 228 | if (!api->transactionGetEstimatedRangeSizeBytes) { |
nothing calls this directly
no test coverage detected