You are here

public function Transaction::__construct in Transaction 5

Same name and namespace in other branches
  1. 6 transaction.module \Transaction::__construct()

Create a new transaction.

File

./transaction.module, line 25
Provides a database transaction system for use with InnoDB tables in MySQL.

Class

Transaction
Provides a nestable transaction system for handling commits and rollbacks.

Code

public function __construct() {
  if (self::$Layers == 0) {
    db_query('BEGIN');
  }
  self::$Layers++;
}