startTransaction

  1. drupal
    1. drupal7
Versionen
drupal7 public DatabaseConnection::startTransaction($required = FALSE)

Returns a new DatabaseTransaction object on this connection.

Übergabeparameter

$required If executing an operation that absolutely must use transactions, specify TRUE for this parameter. If the connection does not support transactions, this method will throw an exception and the operation will not be possible.

See also

DatabaseTransaction

Verwandte Themen

Code

includes/database/database.inc, line 841

<?php
public function startTransaction($required = FALSE) {
  if ($required && !$this->supportsTransactions()) {
    throw new TransactionsNotSupportedException();
  }

  if (empty($this->transactionClass)) {
    $this->transactionClass = 'DatabaseTransaction_' . $this->driver();
    if (!class_exists($this->transactionClass)) {
      $this->transactionClass = 'DatabaseTransaction';
    }
  }
  return new $this->transactionClass($this);
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen