Documentation

EnhancedPDO extends PDO
in package

Extend PDO to add an emulation of nested transactions

Table of Contents

$transactionCounter  : mixed
beginTransaction()  : bool
Create a new transaction.
commit()  : bool
Commit the current transaction.
rollback()  : bool
Rollbacks a transaction.

Properties

$transactionCounter

protected mixed $transactionCounter = 0

Methods

beginTransaction()

Create a new transaction.

public beginTransaction() : bool

If a transaction was already created, only increment the transactions counter.

Also creates a savepoint (InnoDB feature)

Return values
bool

commit()

Commit the current transaction.

public commit() : bool

If there are more virtual transactions then it just decrements the transactions counter.

Return values
bool

rollback()

Rollbacks a transaction.

public rollback() : bool

If there are more virtual transactions then it just rolls back to the previous savepoint.

Return values
bool

Search results