Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/db/db_connection.php
Show First 20 Lines • Show All 682 Lines • ▼ Show 20 Line(s) | |||||
// set 1st checkpoint: begin | // set 1st checkpoint: begin | ||||
$start_time = $this->_captureStatistics ? microtime(true) : 0; | $start_time = $this->_captureStatistics ? microtime(true) : 0; | ||||
// set 1st checkpoint: end | // set 1st checkpoint: end | ||||
$this->setError(0, ''); // reset error | $this->setError(0, ''); // reset error | ||||
$this->queryID = $query_func($sql, $this->connectionID); | $this->queryID = $query_func($sql, $this->connectionID); | ||||
if ( is_resource($this->queryID) ) { | if ( is_resource($this->queryID) ) { | ||||
Lint: Generic.WhiteSpace.ScopeIndent.IncorrectExact: Line indented incorrectly; expected 2 tabs, found 3 | |||||
/** @var kMySQLQuery $ret */ | |||||
$ret = new $iterator_class($this->queryID, $key_field); | $ret = new $iterator_class($this->queryID, $key_field); | ||||
/* @var $ret kMySQLQuery */ | |||||
// set 2nd checkpoint: begin | // set 2nd checkpoint: begin | ||||
if ( $this->_captureStatistics ) { | if ( $this->_captureStatistics ) { | ||||
$query_time = microtime(true) - $start_time; | $query_time = microtime(true) - $start_time; | ||||
if ( $query_time > DBG_MAX_SQL_TIME ) { | if ( $query_time > DBG_MAX_SQL_TIME ) { | ||||
$this->Application->logSlowQuery($sql, $query_time); | $this->Application->logSlowQuery($sql, $query_time); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 494 Lines • ▼ Show 20 Line(s) | |||||
$debugger->profileStart('sql_' . $queryID, $debugger->formatSQL($sql)); | $debugger->profileStart('sql_' . $queryID, $debugger->formatSQL($sql)); | ||||
} | } | ||||
// set 1st checkpoint: end | // set 1st checkpoint: end | ||||
$this->setError(0, ''); // reset error | $this->setError(0, ''); // reset error | ||||
$this->queryID = $query_func($sql, $this->connectionID); | $this->queryID = $query_func($sql, $this->connectionID); | ||||
if ( is_resource($this->queryID) ) { | if ( is_resource($this->queryID) ) { | ||||
/** @var kMySQLQuery $ret */ | |||||
$ret = new $iterator_class($this->queryID, $key_field); | $ret = new $iterator_class($this->queryID, $key_field); | ||||
/* @var $ret kMySQLQuery */ | |||||
// set 2nd checkpoint: begin | // set 2nd checkpoint: begin | ||||
if ( $this->_profileSQLs ) { | if ( $this->_profileSQLs ) { | ||||
$first_cell = count($ret) == 1 && $ret->fieldCount() == 1 ? current($ret->current()) : null; | $first_cell = count($ret) == 1 && $ret->fieldCount() == 1 ? current($ret->current()) : null; | ||||
if ( strlen($first_cell) > 200 ) { | if ( strlen($first_cell) > 200 ) { | ||||
$first_cell = substr($first_cell, 0, 50) . ' ...'; | $first_cell = substr($first_cell, 0, 50) . ' ...'; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 307 Lines • Show Last 20 Lines |
Line indented incorrectly; expected 2 tabs, found 3