Fetch all the records in the table. Can be used as a generic call
to $this->_database->get() with scoped methods.
488881
public function get_all()
    {
        $this->trigger('before_get');

        if ($this->soft_delete && $this->_temporary_with_deleted !== TRUE)
        {
            $this->_database->where($this->soft_delete_key, (bool)$this->_temporary_only_deleted);
        }

        $result = $this->_database->get($this->_table)
                           ->{$this->_return_type(1)}();
        $this->_temporary_return_type = $this->return_type;

        foreach ($result as $key => &$row)
        {
            $row = $this->trigger('after_get', $row, ($key == count($result) - 1));
        }

        $this->_with = array();
        return $result;
    }
855363
public function getAll()
    {
        $sql = "SELECT * FROM `$this->_table`";
        $this->__init_database();

        if ($stmt = $this->db->prepare($sql)) return $this;

        $this->result = $stmt->fetchAll(MySQL::FETCH_OBJ);

        return $this;
    }
416785
public function all()
    {
        $table = trim(self::$table);
        if (!empty($table)) {
            $query = /** @lang text */
                "SELECT * FROM {$table}";


            if(!empty($this->groupby)){
                $query.=' GROUP BY '.$this->groupby;
            }

            if (!empty($this->order)) {
                $query .= $this->order;
            }


            //execute the query and return the data or error message
              return  $this->fetch($query);


        } else {
            static::$response["status"] = "error";
            static::$response["response"] = "Table name cannot be empty";
            static::$response["code"] = 5000;
            return static::terminate(static::$response);
        }
    }
55506
public function findAll() {
        $sql = $this->getSql();
        $params = array_merge($this->whereParams(), $this->having_params);
        $connection = Pool::get(Connection::class);
        try {
            $data = $connection->query($sql, $params, $this->cache);
            Pool::release($connection);
        } catch (\RuntimeException $e) {
            Pool::release($connection);
            throw $e;
        } catch (\Error $e) {
            Pool::release($connection);
            throw $e;
        }
        if ($this->clazz) {
            $results = [];
            l:
            /* @var $item */
            foreach ($data as $item) {
                $clazz = $this->clazz;
                $result = new $clazz;
                foreach ($this->subRecord as $pre => $sub) {
                    $pre .= "_";
                    $values = [];
                    $length = strlen($pre);
                    foreach ($item as $key => $value) {
                        if (strpos($key, $pre) === 0) {
                            unset($item[ $key ]);
                            $key = substr($key, $length);
                            $values[ $key ] = $value;
                        }
                    }
                    $clazz = $sub[ 'class' ];
                    $field = $sub[ 'field' ];
                    /* @var $subRecord Record */
                    $subRecord = new $clazz;
                    $subRecord->fromDbData($values);
                    if ($sub[ 'all_do' ]) {
                        $call = $sub[ 'all_do' ];
                        $call($subRecord);
                    }
                    $result->$field = $subRecord;
                }
                if ($result instanceof Record) {
                    $result->fromDbData($item);
                } else {
                    foreach ($item as $key => $value) {
                        $result->$key = $value;
                    }
                }
                $is_remove = false;
                if ($this->all_do) {
                    foreach ($this->all_do as $do) {
                        $return = $result->$do();
                        if ($return === self::REMOVED) {
                            $is_remove = true;
                            break;
                        }
                    }
                }
                if ($is_remove) {
                    continue;
                }
                if ($this->each) {
                    foreach ($this->each as $each) {
                        $return = $each($result);
                        if ($return === self::REMOVED) {
                            $is_remove = true;
                            break;
                        }
                    }
                }
                if ($is_remove) {
                    continue;
                }
                if ($this->to_array && $result instanceof Record) {
                    $result = $result->toArray($this->to_array, $this->to_array_contain);
                }
                $results[] = $result;
            }
            return $results;
        }
        return $data;
    }
1179354
protected function getData() {
        if ($this->data === null) {
            $stmt = $this->db->get(
                $this->table,
                $this->where,
                $this->options + [Db::OPTION_FETCH_MODE => $this->getFetchArgs()]
            );

            $data = $stmt->fetchAll(...(array)$this->getFetchArgs());

            if (is_callable($this->rowCallback)) {
                array_walk($data, function (&$row) {
                    $row = call_user_func($this->rowCallback, $row);
                });
            }

            $this->data = $data;
        }

        return $this->data;
    }
933587
public function query()
    {
        $stmt = call_user_func_array([$this, 'executeSql'], func_get_args());
        if (ActiveRecord::lastError())
            return false;
        return $stmt->fetchAll();
    }
763429
public function all(): Collection
    {
        return DB::table('user')
            ->where('user_id', '>', 0)
            ->orderBy('real_name')
            ->get()
            ->map(User::rowMapper());
    }
562831
def getall(self, table):
        
        try:
            self._check_db()
        except Exception as e:
            self.err(e, "Can not connect to database")
            return
        if table not in self.db.tables:
            self.warning("The table " + table + " does not exists")
            return
        try:
            res = self.db[table].all()
            df = pd.DataFrame(list(res))
            return df
        except Exception as e:
            self.err(e, "Error retrieving data in table")
931349
final public function findAll()
    {
        $this->query->setStartSelect();

        $this->query->prepare()->bindWhere()->bindLimit()->execute();

        $this->setRowCount();

        $collection = new Collection($this, $this->query->getSqlQuery());

        $this->query->close();

        return $collection();
    }
1079738
public function select()
    {
        $query     = 'SELECT ' . $this->getQueryFields() . ' FROM ' . $this->getTable() . ' ' . $this->getQueryWhere() . ' ' . $this->getQueryOrderBy() . ' ' . $this->getQueryLimit();
        $statement = $this->db->prepare($query);
        $statement->execute($this->binds);

        $this->clear();

        $collection = array();

        while (false !== ($row = $statement->fetchObject())) {
            $collection[] = $this->newDataInstance($row, true);
        }

        return $collection;
    }
14481
def fetchall(self):
        """"""
        self._check_executed()
        if self._rows is None:
            return ()
        if self.rownumber:
            result = self._rows[self.rownumber:]
        else:
            result = self._rows
        self.rownumber = len(self._rows)
        return result
638751
public function get()
    {
        // Define columns
        $columns = count($this->columns)? $this->getColumnsString() : $this->table . '.*';

        // Define root
        $root = 'SELECT ' . $columns . ' FROM ' . $this->table;

        // Define joins
        $joins = count($this->joins)? $this->getJoinString() : '';

        // Define where conditions
        $where = $this->getWhereString();

        // Define where in conditions
        $whereIn = $this->getWhereInString();

        // Define group by
        $groupBy = ($this->groupBy)? 'GROUP BY ' . $this->groupBy : '';

        // Define order
        $orderBy = ($this->orderBy)? $this->getOrderByString() : '';

        // Define limit
        $limit = 'LIMIT ' . $this->offset . ',' . $this->limit;

        // Build query
        $this->query = implode(' ', [$root, $joins, $where, $whereIn, $groupBy, $orderBy, $limit]);

        // Debug
        if ($this->app->config('queries.log')) {
            file_put_contents($this->app->config('queries.log'), date('Y-m-d h:i:s') . ' - ' . $this->query . "\r\n", FILE_APPEND);
        }

        // Prepare statement
        $this->statement = $this->pdo->prepare($this->query);

        // Bind where values
        if (count($this->wheres)) {
            $this->bindWheres();
        }

        // Execute statement
        if (!$this->statement->execute()) {
            throw new \PDOException('Error reading from database', 500);
        }

        // Return results
        $result = $this->statement->fetchAll(\PDO::FETCH_ASSOC);

        // Reset
        $this->reset();

        // Return result
        return $result;
    }
1328512
public function fetch()
	{
		if(count($this->select->getColumns()) === 0)
		{
			/** @var Column $column */
			$column = $this->factory->references('Column', '*');
			$this->select->column($column);
		}
		$query    = $this->factory->builder($this->select)->process();
		$queryObj = $this->pdo->query($query);
		if($queryObj)
		{
			return $queryObj->fetchAll(\PDO::FETCH_ASSOC);
		}

		return array();
	}
557998
public static function getAll()
    {
        try {
            $tableName = self::getTableName();
            $conn = self::getConnection();

            $stmt = $conn->query('SELECT * FROM '.$tableName);

            return $stmt->fetchAll(PDO::FETCH_ASSOC);
        }
        catch(PDOException $pe) {
            return $pe->getMessage();
        }
        catch(Exception $e) {
            return $e->getMessage();
        }
    }
1083848
public function all()
	{
		$callback = $this->connection->executeSelect($this->toSql(), ['12']);

		$start =   time() + microtime(true);

		$statement = $callback();

		$delay = time() + microtime(true) - $start;

		$items = $statement->fetchAll(PDO::FETCH_OBJ);

		$collection = new Collection($items, (count($items) > 0 ? array_keys((array)$items[0]) : []), $delay);

		return $collection;
	}
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());
        }
    }
373817
public function all()
    {
        $query = $this->db->getQuery(true);

        $query->select('*')
            ->from($query->quoteName($this->table));

        return $this->db->setQuery($query)->loadAll(null, 'assoc');
    }