Esempio n. 1
0
 /**
  * Roll back a transaction and return to autocommit mode.
  *
  * @return JO_Db_Adapter_Abstract
  */
 public function rollBack()
 {
     $this->_connect();
     $q = $this->_profiler->queryStart('rollback', JO_Db_Profiler::TRANSACTION);
     $this->_rollBack();
     $this->_profiler->queryEnd($q);
     return $this;
 }
Esempio n. 2
0
 /**
  * Intercept the query end and log the profiling data.
  *
  * @param  integer $queryId
  * @throws JO_Db_Profiler_Exception
  * @return void
  */
 public function queryEnd($queryId)
 {
     $state = parent::queryEnd($queryId);
     if (!$this->getEnabled() || $state == self::IGNORED) {
         return;
     }
     $this->_message->setDestroy(false);
     $profile = $this->getQueryProfile($queryId);
     $this->_totalElapsedTime += $profile->getElapsedSecs();
     $this->_message->addRow(array((string) round($profile->getElapsedSecs(), 5), $profile->getQuery(), ($params = $profile->getQueryParams()) ? $params : null));
     $this->updateMessageLabel();
 }