![]() |
Storage Engine API
|
When constructed, this object begins a WiredTiger transaction on the provided session. More...
#include <wiredtiger_begin_transaction_block.h>
When constructed, this object begins a WiredTiger transaction on the provided session.
The transaction will be rolled back if done() is not called before the object is destructed.
Public Types | |
enum | IgnorePrepared { IgnorePrepared::kNoIgnore, IgnorePrepared::kIgnore } |
enum | RoundToOldest { RoundToOldest::kNoRound, RoundToOldest::kRound } |
Public Member Functions | |
WiredTigerBeginTxnBlock (WT_SESSION *session, IgnorePrepared ignorePrepared=IgnorePrepared::kNoIgnore) | |
WiredTigerBeginTxnBlock (WT_SESSION *session, const char *config) | |
~WiredTigerBeginTxnBlock () | |
Status | setTimestamp (Timestamp, RoundToOldest roundToOldest=RoundToOldest::kNoRound) |
Sets the read timestamp on the opened transaction. More... | |
void | done () |
End the begin transaction block. More... | |
Private Attributes | |
WT_SESSION * | _session |
bool | _rollback = false |
|
strong |
|
strong |
mongo::WiredTigerBeginTxnBlock::WiredTigerBeginTxnBlock | ( | WT_SESSION * | session, |
IgnorePrepared | ignorePrepared = IgnorePrepared::kNoIgnore |
||
) |
mongo::WiredTigerBeginTxnBlock::WiredTigerBeginTxnBlock | ( | WT_SESSION * | session, |
const char * | config | ||
) |
mongo::WiredTigerBeginTxnBlock::~WiredTigerBeginTxnBlock | ( | ) |
void mongo::WiredTigerBeginTxnBlock::done | ( | ) |
End the begin transaction block.
Must be called to ensure the opened transaction is not be rolled back.
Status mongo::WiredTigerBeginTxnBlock::setTimestamp | ( | Timestamp | readTimestamp, |
RoundToOldest | roundToOldest = RoundToOldest::kNoRound |
||
) |
Sets the read timestamp on the opened transaction.
Cannot be called after a call to done().
|
private |
|
private |