popTransaction

  1. drupal
    1. drupal7
Versionen
drupal7 public DatabaseConnection::popTransaction()

Decreases the depth of transaction nesting, committing or rolling back if necessary.

If we pop off the last transaction layer, then we either commit or roll back the transaction as necessary. If no transaction is active, we throw an exception.

See also

DatabaseTransaction

Verwandte Themen

Code

includes/database/database.inc, line 915

<?php
public function popTransaction() {
  if ($this->transactionLayers == 0) {
    throw new NoActiveTransactionException();
  }

  --$this->transactionLayers;

  if ($this->transactionLayers == 0 && $this->supportsTransactions()) {
    if ($this->willRollBack) {
      parent::rollBack();
    }
    else {
      parent::commit();
    }
  }
}
?>

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