Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/db/db_connection.php
Show First 20 Lines • Show All 524 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
} | } | ||||
else { | else { | ||||
while ( $row = $this->queryID->fetch_assoc() ) { | while ( $row = $this->queryID->fetch_assoc() ) { | ||||
$ret[] = $row; | $ret[] = $row; | ||||
} | } | ||||
} | } | ||||
$this->Destroy(); | |||||
// set 2nd checkpoint: begin | // set 2nd checkpoint: begin | ||||
Lint: CodingStandard.Commenting.InlineComment.InvalidEndChar: Inline comments must end in full-stops, exclamation marks, or question marks | |||||
Inline comments must start with a capital letter Lint: CodingStandard.Commenting.InlineComment.NotCapital: Inline comments must start with a capital letter | |||||
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 && !$no_debug ) { | ||||
$this->Application->logSlowQuery($sql, $query_time); | $this->Application->logSlowQuery($sql, $query_time); | ||||
} | } | ||||
$this->_queryTime += $query_time; | $this->_queryTime += $query_time; | ||||
} | } | ||||
// set 2nd checkpoint: end | // set 2nd checkpoint: end | ||||
$this->Destroy(); | |||||
return $ret; | return $ret; | ||||
} | } | ||||
else { | else { | ||||
// set 2nd checkpoint: begin | // set 2nd checkpoint: begin | ||||
if ( $this->_captureStatistics ) { | if ( $this->_captureStatistics ) { | ||||
$this->_queryTime += microtime(true) - $start_time; | $this->_queryTime += microtime(true) - $start_time; | ||||
} | } | ||||
// set 2nd checkpoint: end | // set 2nd checkpoint: end | ||||
Show All 30 Lines | |||||
if ( is_object($this->queryID) ) { | if ( is_object($this->queryID) ) { | ||||
/** @var kMySQLQuery $ret */ | /** @var kMySQLQuery $ret */ | ||||
$ret = new $iterator_class($this->queryID, $key_field); | $ret = new $iterator_class($this->queryID, $key_field); | ||||
// 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 && !$no_debug ) { | ||||
$this->Application->logSlowQuery($sql, $query_time); | $this->Application->logSlowQuery($sql, $query_time); | ||||
} | } | ||||
$this->_queryTime += $query_time; | $this->_queryTime += $query_time; | ||||
} | } | ||||
// set 2nd checkpoint: end | // set 2nd checkpoint: end | ||||
return $ret; | return $ret; | ||||
▲ Show 20 Lines • Show All 807 Lines • Show Last 20 Lines |
Inline comments must end in full-stops, exclamation marks, or question marks