예제 #1
0
 /**
  * Executes a SELECT query and returns an array containing all of the result set rows.
  *
  * @access  public
  * @return  array
  */
 public function all()
 {
     $query = $this->compiler->select();
     return $this->connection->all($query['sql'], $query['params'], static::FETCH_MODE);
 }
예제 #2
0
파일: Query.php 프로젝트: twocore/framework
 /**
  * Executes a SELECT query and returns an array containing all of the result set rows.
  *
  * @access  public
  * @param   boolean  $returnResultSet  Return result set?
  * @param   mixed    ...$fetchMode     Fetch mode
  * @return  array
  */
 protected function fetchAll($returnResultSet, ...$fetchMode)
 {
     $query = $this->compiler->select();
     $results = $this->connection->all($query['sql'], $query['params'], ...$fetchMode);
     return $returnResultSet ? new ResultSet($results) : $results;
 }