/** * Roll back a transaction and return to autocommit mode. * * @return \Zend\Db\Adapter\AbstractAdapter */ public function rollBack() { $this->_connect(); $q = $this->_profiler->queryStart('rollback', Profiler::TRANSACTION); $this->_rollBack(); $this->_profiler->queryEnd($q); return $this; }
/** * Intercept the query end and log the profiling data. * * @param integer $queryId * @throws \Zend\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(); }