public function Connection::startTransaction

Returns a new DatabaseTransaction object on this connection.

Parameters

$name: Optional name of the savepoint.

Return value

Drupal\Core\Database\Transaction A DatabaseTransaction object.

See also

Drupal\Core\Database\Transaction

1 call to Connection::startTransaction()
Connection::nextId in drupal/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
Retrieves an unique id from a given sequence.

File

drupal/core/lib/Drupal/Core/Database/Connection.php, line 864
Definition of Drupal\Core\Database\Connection

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function startTransaction($name = '') {
  $class = $this
    ->getDriverClass('Transaction');
  return new $class($this, $name);
}