src/QueryBuilder.php
protected function _run(string $type, string $table, string $sql=NULL, array $vals=NULL, bool $reset=TRUE): PDOStatement
	{
		if ($sql === NULL)
		{
			$sql = $this->_compile($type, $table);
		}

		if ($vals === NULL)
		{
			$vals = array_merge($this->state->getValues(), $this->state->getWhereValues());
		}

		$startTime = microtime(TRUE);

		$res = empty($vals)
			? $this->driver->query($sql)
			: $this->driver->prepareExecute($sql, $vals);

		$endTime = microtime(TRUE);
		$totalTime = number_format($endTime - $startTime, 5);

		// Add this query to the list of executed queries
		$this->_appendQuery($vals, $sql, (int) $totalTime);

		// Reset class state for next query
		if ($reset)
		{
			$this->resetQuery();
		}

		return $res;
	}
protected function _run(string $type, string $table, string $sql=NULL, array $vals=NULL, bool $reset=TRUE): PDOStatement
	{
		if ($sql === NULL)
		{
			$sql = $this->_compile($type, $table);
		}

		if ($vals === NULL)
		{
			$vals = array_merge($this->state->getValues(), $this->state->getWhereValues());
		}

		$startTime = microtime(TRUE);

		$res = empty($vals)
			? $this->driver->query($sql)
			: $this->driver->prepareExecute($sql, $vals);

		$endTime = microtime(TRUE);
		$totalTime = number_format($endTime - $startTime, 5);

		// Add this query to the list of executed queries
		$this->_appendQuery($vals, $sql, (int) $totalTime);

		// Reset class state for next query
		if ($reset)
		{
			$this->resetQuery();
		}

		return $res;
	}
protected function _run ( string $ type , string $ table , string $ sql = NULL , array $ vals = NULL , bool $ reset = TRUE ) : PDOStatement { if ( $ sql === NULL ) { $ sql = $ this -> _compile ( $ type , $ table ) ; } if ( $ vals === NULL ) { $ vals = array_merge ( $ this -> state -> getValues ( ) , $ this -> state -> getWhereValues ( ) ) ; } $ startTime = microtime ( TRUE ) ; $ res = empty ( $ vals ) ? $ this -> driver -> query ( $ sql ) : $ this -> driver -> prepareExecute ( $ sql , $ vals ) ; $ endTime = microtime ( TRUE ) ; $ totalTime = number_format ( $ endTime - $ startTime , 5 ) ; // Add this query to the list of executed queries $ this -> _appendQuery ( $ vals , $ sql , ( int ) $ totalTime ) ; // Reset class state for next query if ( $ reset ) { $ this -> resetQuery ( ) ; } return $ res ; }
Executes the compiled query

@param string $type
@param string $table
@param string $sql
@param array|null $vals
@param boolean $reset
@return PDOStatement
Executes the compiled query