Database Helper method to support nested transactions

package XenForo_Core

 Methods

Starts a new transaction, if already in one it creates a savepoint

beginTransaction(\Zend_Db_Adapter_Abstract $db) 
Static

Parameters

$db

\Zend_Db_Adapater_Abstract

Commits the current savepoint or the main transaction

commit(\Zend_Db_Adapter_Abstract $db) 
Static

Parameters

$db

\Zend_Db_Adapater_Abstract

Quotes for a LIKE clause.

quoteLike(string $string, string $wildCard, \Zend_Db_Adapter_Abstract $db) : string
Static

Parameters

$string

string

String to quote

$wildCard

string

Where to place a wildcard match (l, r, or lr)

$db

\Zend_Db_Adapter_Abstractnull

DB adapter

Returns

string

Rollback the last save point or the entire transaction if needed

rollback(\Zend_Db_Adapter_Abstract $db) 
Static

Parameters

$db

\Zend_Db_Adapater_Abstract

Rolls back all pending transactions/save points.

rollbackAll(\Zend_Db_Adapter_Abstract $db) 
Static

Parameters

$db

\Zend_Db_Adapter_Abstractnull

_execQuery()

_execQuery(\Zend_Db_Adapter_Abstract $db, $query) 
Static

Parameters

$db

$query

 Properties

 

$_savepointStack : array

 Constants

 

Constant for representing the initial transaction.

INITIAL_TRANSACTION : string