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

Function getTransaction

fdbcli/fdbcli.actor.cpp:720–737  ·  view source on GitHub ↗

TODO: Update the function to get rid of the Database after refactoring

Source from the content-addressed store, hash-verified

718
719// TODO: Update the function to get rid of the Database after refactoring
720Reference<ITransaction> getTransaction(Reference<IDatabase> db,
721 Reference<ITenant> tenant,
722 Reference<ITransaction>& tr,
723 FdbOptions* options,
724 bool intrans) {
725 // Update "tr" to point to a brand new transaction object when it's not initialized or "intrans" flag is "false",
726 // which indicates we need a new transaction object
727 if (!tr || !intrans) {
728 if (tenant) {
729 tr = tenant->createTransaction();
730 } else {
731 tr = db->createTransaction();
732 }
733 options->apply(tr);
734 }
735
736 return tr;
737}
738
739std::string newCompletion(const char* base, const char* name) {
740 return format("%s%s ", base, name);

Callers 15

Future<int> cliFunction · 0.85
fdbcli.actor.cppFile · 0.85
cancelMethod · 0.85
setVersionMethod · 0.85
getReadVersionMethod · 0.85
getMethod · 0.85
getKeyMethod · 0.85
getRangeMethod · 0.85
getMappedRangeMethod · 0.85
getVersionstampMethod · 0.85
getAddressesForKeyMethod · 0.85
addReadConflictRangeMethod · 0.85

Calls 2

createTransactionMethod · 0.65
applyMethod · 0.45

Tested by

no test coverage detected