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

Classes

class  Transaction
 
class  TransactionContext
 

Enumerations

enum class  TransactionType : uint8_t {
  READ_ONLY , WRITE , CHECKPOINT , DUMMY ,
  RECOVERY
}
 
enum class  TransactionMode : uint8_t { AUTO = 0 , MANUAL = 1 }
 

Variables

KUZU_API Transaction DUMMY_TRANSACTION
 
KUZU_API Transaction DUMMY_CHECKPOINT_TRANSACTION
 

Enumeration Type Documentation

◆ TransactionMode

enum class kuzu::transaction::TransactionMode : uint8_t
strong

If the connection is in AUTO_COMMIT mode any query over the connection will be wrapped around a transaction and committed (even if the query is READ_ONLY). If the connection is in MANUAL transaction mode, which happens only if an application manually begins a transaction (see below), then an application has to manually commit or rollback the transaction by calling commit() or rollback().

AUTO_COMMIT is the default mode when a Connection is created. If an application calls begin[ReadOnly/Write]Transaction at any point, the mode switches to MANUAL. This creates an "active transaction" in the connection. When a connection is in MANUAL mode and the active transaction is rolled back or committed, then the active transaction is removed (so the connection no longer has an active transaction) and the mode automatically switches back to AUTO_COMMIT. Note: When a Connection object is deconstructed, if the connection has an active (manual) transaction, then the active transaction is rolled back.

Enumerator
AUTO 
MANUAL 

◆ TransactionType

enum class kuzu::transaction::TransactionType : uint8_t
strong
Enumerator
READ_ONLY 
WRITE 
CHECKPOINT 
DUMMY 
RECOVERY 

Variable Documentation

◆ DUMMY_CHECKPOINT_TRANSACTION

KUZU_API Transaction kuzu::transaction::DUMMY_CHECKPOINT_TRANSACTION
extern

◆ DUMMY_TRANSACTION

KUZU_API Transaction kuzu::transaction::DUMMY_TRANSACTION
extern