class TransactionsHandler implements ITransactions (View source)

Properties

static protected int $transactionCounter
static protected bool $inTransaction
static protected IConnection $instance

Methods

__construct(IConnection $instance)

No description

getInstance()

No description

bool
beginTransaction()

This function creates a new transaction, in order to be able to commit or rollback changes made to the database.

bool
commit()

This function commits any changes made to the database during this transaction.

bool
inTransaction()

This function returns the last ID generated by an auto-increment column, either the last one inserted during the current transaction, or by passing in the optional name parameter.

bool
rollback()

This function rolls back any changes made to the database during this transaction and restores the data to its original state.

Details

__construct(IConnection $instance)

No description

Parameters

IConnection $instance

IConnection getInstance()

No description

Return Value

IConnection

bool beginTransaction()

This function creates a new transaction, in order to be able to commit or rollback changes made to the database.

Return Value

bool

Exceptions

ErrorException

bool commit()

This function commits any changes made to the database during this transaction.

Return Value

bool

bool inTransaction()

This function returns the last ID generated by an auto-increment column, either the last one inserted during the current transaction, or by passing in the optional name parameter.

Return Value

bool

bool rollback()

This function rolls back any changes made to the database during this transaction and restores the data to its original state.

Return Value

bool