Beispiel #1
0
 /**
  * @return  \Zork\Db\Adapter\Driver\Pdo\PgsqlConnection
  * @throws  UnbalancedNestedTransactionsException
  */
 public function commit()
 {
     if ($this->isNestableTransactionsEnabled()) {
         $this->transactionNestingLevel--;
         $this->checkUnbalancedNestedTransactions();
         if ($this->transactionNestingLevel == 0) {
             parent::commit();
         } else {
             if (!$this->isConnected()) {
                 $this->connect();
             }
             $this->getResource()->exec('RELEASE SAVEPOINT zorksavepoint_' . $this->transactionSavepointUniqueId . '_' . $this->transactionNestingLevel);
         }
         return $this;
     }
     return parent::commit();
 }