25#ifndef FBCPP_TRANSACTION_H 
   26#define FBCPP_TRANSACTION_H 
   93        const std::vector<std::uint8_t>& 
getTpb()
 const 
 
  114            tpb = std::move(value);
 
 
  123            return isolationLevel;
 
 
  131            isolationLevel = value;
 
 
  140            return readCommittedMode;
 
 
  148            readCommittedMode = value;
 
 
  227            return restartRequests;
 
 
  235            restartRequests = value;
 
 
  257        std::vector<std::uint8_t> tpb;
 
  258        std::optional<TransactionIsolationLevel> isolationLevel;
 
  259        std::optional<TransactionReadCommittedMode> readCommittedMode;
 
  260        std::optional<TransactionAccessMode> accessMode;
 
  261        std::optional<TransactionWaitMode> waitMode;
 
  262        bool noAutoUndo = 
false;
 
  263        bool ignoreLimbo = 
false;
 
  264        bool restartRequests = 
false;
 
  265        bool autoCommit = 
false;
 
 
  299              handle{std::move(o.handle)}
 
 
  303        Transaction& operator=(Transaction&&) = 
delete;
 
  305        Transaction(
const Transaction&) = 
delete;
 
  306        Transaction& operator=(
const Transaction&) = 
delete;
 
  332            return handle != 
nullptr;
 
 
 
Represents a connection to a Firebird database.
Represents a Firebird client library instance.
Represents options used when creating a Transaction object.
bool getAutoCommit() const
Returns whether the transaction will be automatically committed.
const std::vector< std::uint8_t > & getTpb() const
Returns the TPB (Transaction Parameter Block) which will be used to start the transaction.
TransactionOptions & setWaitMode(TransactionWaitMode value)
Sets the transaction wait mode.
TransactionOptions & setTpb(std::vector< std::uint8_t > &&value)
Sets the TPB (Transaction Parameter Block) which will be used to start the transaction.
bool getRestartRequests() const
Returns whether the transaction will restart requests.
const std::optional< TransactionAccessMode > getAccessMode() const
Returns the transaction access mode.
bool getNoAutoUndo() const
Returns whether the transaction will not automatically undo changes in case of a deadlock or update c...
bool getIgnoreLimbo() const
Returns whether the transaction will ignore limbo transactions.
const std::optional< TransactionIsolationLevel > getIsolationLevel() const
Returns the transaction isolation level.
const std::optional< TransactionReadCommittedMode > getReadCommittedMode() const
Returns the read committed mode.
TransactionOptions & setAccessMode(TransactionAccessMode value)
Sets the transaction access mode.
TransactionOptions & setTpb(const std::vector< std::uint8_t > &value)
Sets the TPB (Transaction Parameter Block) which will be used to start the transaction.
TransactionOptions & setReadCommittedMode(TransactionReadCommittedMode value)
Sets the read committed mode.
TransactionOptions & setNoAutoUndo(bool value)
Sets whether the transaction will not automatically undo changes in case of a deadlock or update conf...
TransactionOptions & setIsolationLevel(TransactionIsolationLevel value)
Sets the transaction isolation level.
TransactionOptions & setAutoCommit(bool value)
Sets whether the transaction will be automatically committed.
const std::optional< TransactionWaitMode > getWaitMode() const
Returns the transaction wait mode.
TransactionOptions & setIgnoreLimbo(bool value)
Sets whether the transaction will ignore limbo transactions.
TransactionOptions & setRestartRequests(bool value)
Sets whether the transaction will restart requests.
Represents a transaction in a Firebird database.
void rollback()
Rolls back the transaction.
Transaction(Transaction &&o) noexcept
Move constructor.
~Transaction() noexcept
Rolls back the transaction if it is still active.
void commit()
Commits the transaction.
bool isValid() noexcept
Returns whether the Transaction object is valid.
FbRef< fb::ITransaction > getHandle() noexcept
Returns the internal Firebird ITransaction handle.
void commitRetaining()
Commits the transaction while maintains it active.
void rollbackRetaining()
Rolls back the transaction while maintains it active.
TransactionAccessMode
Transaction access mode.
TransactionReadCommittedMode
Transaction read committed mode.
TransactionIsolationLevel
Transaction isolation level.
TransactionWaitMode
Transaction wait mode.