public function DatabaseConnection_sqlite::pushTransaction in Drupal 7
Increases the depth of transaction nesting.
If no transaction is already active, we begin a new transaction.
Throws
DatabaseTransactionNameNonUniqueException
Overrides DatabaseConnection::pushTransaction
See also
File
- includes/
database/ sqlite/ database.inc, line 357 - Database interface code for SQLite embedded database engine.
Class
- DatabaseConnection_sqlite
- Specific SQLite implementation of DatabaseConnection.
Code
public function pushTransaction($name) {
if ($this->savepointSupport) {
return parent::pushTransaction($name);
}
if (!$this
->supportsTransactions()) {
return;
}
if (isset($this->transactionLayers[$name])) {
throw new DatabaseTransactionNameNonUniqueException($name . " is already in use.");
}
if (!$this
->inTransaction()) {
$this->connection
->beginTransaction();
}
$this->transactionLayers[$name] = $name;
}