Get All SQL Query as an array.

@return array
552216
public function toArray()
    {
        $arrayResult = array();
        for ($i = 0; $i < $this->length(); ++$i) {
            if ($this->offsetExists($i)) {
                $arrayResult[] = $this->offsetGet($i)->toArray();
            }
        }

        return $arrayResult;
    }
1120501
public function all() {
  $query = new \Peyote\Select($this->db_table());
  $query->columns('name');
  $result = $this->db->fetch($query);
  foreach($result as $r) {
   $list[] = $r['name'];
  }
  return $list;
 }
1092804
public function fetch(): array
    {
        $sql = $this->builder->buildSql();
        $this->builder = new QueryBuilder($this->pdo);
        return $this->fetchBySql($sql);
    }
988593
public static function getAll($query)
    {
        $ret = array();

        $res = self::query($query);
        if ($res) {
            while ($row = self::connection()->sql_fetch_assoc($res)) {
                $ret[] = $row;
            }
            self::free($res);
        }

        return $ret;
    }
324068
public function getQueryParts()
    {
        $result = [
            'type' => $this->getQueryType(),
            'fields' => $this->fields,
            'table' => $this->getTable()
        ];

        if (!empty($this->values)) {
            $result['values'] = $this->values;
        }

        if (!empty($this->set)) {
            $result['set'] = $this->set;
        }

        if (!empty($this->joins)) {
            $result['join'] = $this->joins;
        }

        if (!empty($this->wheres)) {
            $result['where'] = $this->wheres;
        }

        if (!empty($this->group)) {
            $result['group'] = $this->group;
        }

        if (!empty($this->order)) {
            $result['order'] = $this->order;
        }

        if (!empty($this->limit)) {
            $result['limit'] = $this->limit;
        }

        return $result;
    }
584026
public function toArray()
    {
        return [
            $this->id,
            $this->filterName,
            $this->operator,
            serialize($this->value),
        ];
    }
408573
public function toArray()
    {
        $connections = array();

        /** @var $connection DbalConnection */
        foreach ($this as $key => $connection)
        {
            $connections[$key] = $connection->config();
        }

        return $connections;
    }
1100564
protected function getDatabaseQueries()
    {
        $queries = [];
        foreach ($this->logger->queries as $query) {
            $queries[] = [
                'query'      => $this->formatter->format($this->connection->getDatabasePlatform(), $query['sql'], $query['params']),
                'duration'   => $query['executionMS'] * 1000,
                'connection' => $this->connection->getDriver()->getName()
            ];
        }

        return $queries;
    }
1041075
public function getQueryAsArray()
        {
            $query = $this->getQuery();
            $querryArray = array();

            if ($query !== false) {
                parse_str($query, $querryArray);
            }

            return $querryArray;
        }
1144850
public function fetchAll()
    {
        $query = sprintf('SELECT * FROM `%s`', $this->table);
        $result = array();

        foreach ($this->pdo->query($query) as $key => $value) {
            $result[$key] = $value;
        }

        return $this->parse($result);
    }
311691
public function getRows()
    {
        $rows = [];
        $wheres = $this->queryBuilder->wheres ?: [];

        foreach ($wheres as $where) {

            // Skip unsupported clauses
            if (!isset($where['column'])) {
                continue;
            }

            // If it doesn't contain the table name assume it's the "FROM" table
            if (strpos($where['column'], '.') === false) {
                $where['column'] = implode('.', [$this->queryBuilder->from, $where['column']]);
            }

            list($table, $column) = $this->splitTableAndColumn($where['column']);

            // Make sure that the where clause applies for the primary key column
            if ($column !== self::PRIMARY_KEY_COLUMN) {
                continue;
            }

            // Initialize a set for the current table
            if (!isset($rows[$table])) {
                $rows[$table] = [];
            }

            // Add the rows to the current table set
            if ($where['type'] === 'Basic') {
                if ($where['operator'] === '=' && is_numeric($where['value'])) {
                    $rows[$table][] = $where['value'];
                }
            }
            else if ($where['type'] === 'In') {
                $rows[$table] += $where['values'];
            }
        }

        return $rows;
    }
1243849
public function all()
    {
        $sql = 'SELECT * FROM ' . $this->table;

        $stat = $this->pdo->query($sql);

        return $stat->fetchAll(\PDO::FETCH_ASSOC);
    }
525707
public function getAllTables(): array
    {
        $schema = $this->getSchema();

        $names           = $schema->listTableNames();
        $tableExceptions = ['migrations'];

        $result = [];
        foreach ($names as $name) {
            if (!in_array($name, $tableExceptions)) {
                $result[] = $name;
            }
        }

        return $result;
    }
933587
public function query()
    {
        $stmt = call_user_func_array([$this, 'executeSql'], func_get_args());
        if (ActiveRecord::lastError())
            return false;
        return $stmt->fetchAll();
    }
446785
public function getQuery()
    {
        $sql = $this->prepareSelectString();
        $sql .= $this->prepareJoinString();
        $sql .= $this->prepareWhereString();
        $sql .= $this->prepareGroupByString();
        $sql .= $this->prepareHavingString();
        $sql .= $this->prepareOrderByString();
        $sql .= $this->prepareLimitString();

        return $sql;
    }
829154
public static function all()
    {
        try {
            self::init();
            $query = 'SELECT * FROM ' . self::$modelTable;
            $qb = new QueryBuilder(self::$connect, $query);
            return $qb->get();

        } catch (\Exception $exception) {
            var_dump($exception->getMessage());
        }
    }
467559
public function toArray(): array
    {
        return array_filter([
            'field' => 'uuid.type' === $this->field
                ? null
                : $this->field,
            'values' => $this->values,
            'application_type' => self::AT_LEAST_ONE === $this->applicationType
                ? null
                : $this->applicationType,
            'filter_type' => self::TYPE_FIELD === $this->filterType
                ? null
                : $this->filterType,
            'filter_terms' => $this->filterTerms,
        ], function ($element) {
            return
            !(
                is_null($element) ||
                (is_array($element) && empty($element))
            );
        });
    }