Kùzu C++ API
Loading...
Searching...
No Matches
kuzu::transaction::Transaction Class Reference

#include <transaction.h>

Public Member Functions

 Transaction (main::ClientContext &clientContext, TransactionType transactionType, common::transaction_t transactionID, common::transaction_t startTS)
 
 Transaction (TransactionType transactionType) noexcept
 
 Transaction (TransactionType transactionType, common::transaction_t ID, common::transaction_t startTS) noexcept
 
 ~Transaction ()
 
TransactionType getType () const
 
bool isReadOnly () const
 
bool isWriteTransaction () const
 
bool isDummy () const
 
bool isRecovery () const
 
common::transaction_t getID () const
 
common::transaction_t getStartTS () const
 
common::transaction_t getCommitTS () const
 
int64_t getCurrentTS () const
 
main::ClientContextgetClientContext () const
 
void checkForceCheckpoint (common::StatementType statementType)
 
bool shouldAppendToUndoBuffer () const
 
bool shouldLogToWAL () const
 
bool shouldForceCheckpoint () const
 
KUZU_API void commit (storage::WAL *wal) const
 
void rollback (storage::WAL *wal) const
 
uint64_t getEstimatedMemUsage () const
 
storage::LocalStorage * getLocalStorage () const
 
bool hasNewlyInsertedNodes (common::table_id_t tableID) const
 
void setMaxCommittedNodeOffset (common::table_id_t tableID, common::offset_t offset)
 
bool isUnCommitted (common::table_id_t tableID, common::offset_t nodeOffset) const
 
common::row_idx_t getLocalRowIdx (common::table_id_t tableID, common::offset_t nodeOffset) const
 
common::offset_t getUncommittedOffset (common::table_id_t tableID, common::row_idx_t localRowIdx) const
 
common::offset_t getMinUncommittedNodeOffset (common::table_id_t tableID) const
 
common::offset_t getMaxCommittedNodeOffset (common::table_id_t tableID) const
 
common::offset_t getCommittedOffsetFromUncommitted (common::table_id_t tableID, common::offset_t uncommittedOffset) const
 
void pushCatalogEntry (catalog::CatalogSet &catalogSet, catalog::CatalogEntry &catalogEntry, bool skipLoggingToWAL=false) const
 
void pushSequenceChange (catalog::SequenceCatalogEntry *sequenceEntry, int64_t kCount, const catalog::SequenceRollbackData &data) const
 
void pushInsertInfo (common::node_group_idx_t nodeGroupIdx, common::row_idx_t startRow, common::row_idx_t numRows, const storage::VersionRecordHandler *versionRecordHandler) const
 
void pushDeleteInfo (common::node_group_idx_t nodeGroupIdx, common::row_idx_t startRow, common::row_idx_t numRows, const storage::VersionRecordHandler *versionRecordHandler) const
 
void pushVectorUpdateInfo (storage::UpdateInfo &updateInfo, common::idx_t vectorIdx, storage::VectorUpdateInfo &vectorUpdateInfo) const
 

Static Public Member Functions

static Transaction getDummyTransactionFromExistingOne (const Transaction &other)
 

Static Public Attributes

static constexpr common::transaction_t DUMMY_TRANSACTION_ID = 0
 
static constexpr common::transaction_t DUMMY_START_TIMESTAMP = 0
 
static constexpr common::transaction_t START_TRANSACTION_ID
 

Friends

class TransactionManager
 

Constructor & Destructor Documentation

◆ Transaction() [1/3]

kuzu::transaction::Transaction::Transaction ( main::ClientContext & clientContext,
TransactionType transactionType,
common::transaction_t transactionID,
common::transaction_t startTS )

◆ Transaction() [2/3]

kuzu::transaction::Transaction::Transaction ( TransactionType transactionType)
explicitnoexcept

◆ Transaction() [3/3]

kuzu::transaction::Transaction::Transaction ( TransactionType transactionType,
common::transaction_t ID,
common::transaction_t startTS )
noexcept

◆ ~Transaction()

kuzu::transaction::Transaction::~Transaction ( )

Member Function Documentation

◆ checkForceCheckpoint()

void kuzu::transaction::Transaction::checkForceCheckpoint ( common::StatementType statementType)
inline

◆ commit()

KUZU_API void kuzu::transaction::Transaction::commit ( storage::WAL * wal) const

◆ getClientContext()

main::ClientContext * kuzu::transaction::Transaction::getClientContext ( ) const
inline

◆ getCommittedOffsetFromUncommitted()

common::offset_t kuzu::transaction::Transaction::getCommittedOffsetFromUncommitted ( common::table_id_t tableID,
common::offset_t uncommittedOffset ) const
inline

◆ getCommitTS()

common::transaction_t kuzu::transaction::Transaction::getCommitTS ( ) const
inline

◆ getCurrentTS()

int64_t kuzu::transaction::Transaction::getCurrentTS ( ) const
inline

◆ getDummyTransactionFromExistingOne()

static Transaction kuzu::transaction::Transaction::getDummyTransactionFromExistingOne ( const Transaction & other)
static

◆ getEstimatedMemUsage()

uint64_t kuzu::transaction::Transaction::getEstimatedMemUsage ( ) const

◆ getID()

common::transaction_t kuzu::transaction::Transaction::getID ( ) const
inline

◆ getLocalRowIdx()

common::row_idx_t kuzu::transaction::Transaction::getLocalRowIdx ( common::table_id_t tableID,
common::offset_t nodeOffset ) const
inline

◆ getLocalStorage()

storage::LocalStorage * kuzu::transaction::Transaction::getLocalStorage ( ) const
inline

◆ getMaxCommittedNodeOffset()

common::offset_t kuzu::transaction::Transaction::getMaxCommittedNodeOffset ( common::table_id_t tableID) const
inline

◆ getMinUncommittedNodeOffset()

common::offset_t kuzu::transaction::Transaction::getMinUncommittedNodeOffset ( common::table_id_t tableID) const
inline

◆ getStartTS()

common::transaction_t kuzu::transaction::Transaction::getStartTS ( ) const
inline

◆ getType()

TransactionType kuzu::transaction::Transaction::getType ( ) const
inline

◆ getUncommittedOffset()

common::offset_t kuzu::transaction::Transaction::getUncommittedOffset ( common::table_id_t tableID,
common::row_idx_t localRowIdx ) const
inline

◆ hasNewlyInsertedNodes()

bool kuzu::transaction::Transaction::hasNewlyInsertedNodes ( common::table_id_t tableID) const
inline

◆ isDummy()

bool kuzu::transaction::Transaction::isDummy ( ) const
inline

◆ isReadOnly()

bool kuzu::transaction::Transaction::isReadOnly ( ) const
inline

◆ isRecovery()

bool kuzu::transaction::Transaction::isRecovery ( ) const
inline

◆ isUnCommitted()

bool kuzu::transaction::Transaction::isUnCommitted ( common::table_id_t tableID,
common::offset_t nodeOffset ) const
inline

◆ isWriteTransaction()

bool kuzu::transaction::Transaction::isWriteTransaction ( ) const
inline

◆ pushCatalogEntry()

void kuzu::transaction::Transaction::pushCatalogEntry ( catalog::CatalogSet & catalogSet,
catalog::CatalogEntry & catalogEntry,
bool skipLoggingToWAL = false ) const

◆ pushDeleteInfo()

void kuzu::transaction::Transaction::pushDeleteInfo ( common::node_group_idx_t nodeGroupIdx,
common::row_idx_t startRow,
common::row_idx_t numRows,
const storage::VersionRecordHandler * versionRecordHandler ) const

◆ pushInsertInfo()

void kuzu::transaction::Transaction::pushInsertInfo ( common::node_group_idx_t nodeGroupIdx,
common::row_idx_t startRow,
common::row_idx_t numRows,
const storage::VersionRecordHandler * versionRecordHandler ) const

◆ pushSequenceChange()

void kuzu::transaction::Transaction::pushSequenceChange ( catalog::SequenceCatalogEntry * sequenceEntry,
int64_t kCount,
const catalog::SequenceRollbackData & data ) const

◆ pushVectorUpdateInfo()

void kuzu::transaction::Transaction::pushVectorUpdateInfo ( storage::UpdateInfo & updateInfo,
common::idx_t vectorIdx,
storage::VectorUpdateInfo & vectorUpdateInfo ) const

◆ rollback()

void kuzu::transaction::Transaction::rollback ( storage::WAL * wal) const

◆ setMaxCommittedNodeOffset()

void kuzu::transaction::Transaction::setMaxCommittedNodeOffset ( common::table_id_t tableID,
common::offset_t offset )
inline

◆ shouldAppendToUndoBuffer()

bool kuzu::transaction::Transaction::shouldAppendToUndoBuffer ( ) const
inline

◆ shouldForceCheckpoint()

bool kuzu::transaction::Transaction::shouldForceCheckpoint ( ) const

◆ shouldLogToWAL()

bool kuzu::transaction::Transaction::shouldLogToWAL ( ) const

Friends And Related Symbol Documentation

◆ TransactionManager

friend class TransactionManager
friend

Member Data Documentation

◆ DUMMY_START_TIMESTAMP

common::transaction_t kuzu::transaction::Transaction::DUMMY_START_TIMESTAMP = 0
staticconstexpr

◆ DUMMY_TRANSACTION_ID

common::transaction_t kuzu::transaction::Transaction::DUMMY_TRANSACTION_ID = 0
staticconstexpr

◆ START_TRANSACTION_ID

common::transaction_t kuzu::transaction::Transaction::START_TRANSACTION_ID
staticconstexpr
Initial value:
=
static_cast<common::transaction_t>(1) << 63
uint64_t transaction_t
Definition types.h:64

The documentation for this class was generated from the following file: