rollBack() public méthode

public rollBack ( ) : void
Résultat void
Exemple #1
0
 /** @return void */
 public function rollback()
 {
     if (self::$transactionCounter[$dsn = $this->getDsnKey()] !== 0) {
         $this->connection->rollBack();
     }
     self::$transactionCounter[$dsn] = 0;
 }
Exemple #2
0
 /**
  * Rollback to savepoint.
  *
  * @return void
  * @throws InvalidTransactionException
  */
 public function rollback()
 {
     if (self::$level === 0) {
         throw new InvalidTransactionException('No transaction started');
     }
     self::$level--;
     if (self::$level === 0 || !$this->isSupported()) {
         $this->connection->rollBack();
     } else {
         $this->connection->getPdo()->exec('ROLLBACK TO SAVEPOINT LEVEL' . self::$level);
     }
 }
Exemple #3
0
 /** @return void */
 public function rollBack()
 {
     $this->connection->rollBack();
 }