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

Method DLDatabase

fdbclient/MultiVersionTransaction.actor.cpp:494–506  ·  view source on GitHub ↗

DLDatabase

Source from the content-addressed store, hash-verified

492
493// DLDatabase
494DLDatabase::DLDatabase(Reference<FdbCApi> api, ThreadFuture<FdbCApi::FDBDatabase*> dbFuture) : api(api), db(nullptr) {
495 addref();
496 ready = mapThreadFuture<FdbCApi::FDBDatabase*, Void>(dbFuture, [this](ErrorOr<FdbCApi::FDBDatabase*> db) {
497 if (db.isError()) {
498 delref();
499 return ErrorOr<Void>(db.getError());
500 }
501
502 this->db = db.get();
503 delref();
504 return ErrorOr<Void>(Void());
505 });
506}
507
508ThreadFuture<Void> DLDatabase::onReady() {
509 return ready;

Callers

nothing calls this directly

Calls 6

addrefFunction · 0.70
delrefFunction · 0.70
getMethod · 0.65
VoidClass · 0.50
isErrorMethod · 0.45
getErrorMethod · 0.45

Tested by

no test coverage detected