src/main/php/Database.php
public function fetchAll(
            string $sql,
            array $values = [],
            int $fetchMode = null,
            array $driverOptions = []
    ): Sequence {
        return Sequence::of(new QueryResultIterator(
                $this->dbConnection->prepare($sql)->execute($values),
                $fetchMode,
                $driverOptions
        ));
    }
public function fetchAll(
            string $sql,
            array $values = [],
            int $fetchMode = null,
            array $driverOptions = []
    ): Sequence {
        return Sequence::of(new QueryResultIterator(
                $this->dbConnection->prepare($sql)->execute($values),
                $fetchMode,
                $driverOptions
        ));
    }
public function fetchAll ( string $ sql , array $ values = [ ] , int $ fetchMode = null , array $ driverOptions = [ ] ) : Sequence { return Sequence :: of ( new QueryResultIterator ( $ this -> dbConnection -> prepare ( $ sql ) -> execute ( $ values ) , $ fetchMode , $ driverOptions ) ) ; }
return all result rows for given sql query

Allows to fetch all results for a query at once.
<code>
$blockedUsers = $database->fetchAll('SELECT * FROM users WHERE status = "blocked"');
</code>
Now $blockedUsers contains all rows from the query.

@param   string  $sql            sql query to fetch data with
@param   array   $values         map of values in case $sql contains a prepared statement
@param   int     $fetchMode      optional  the mode to use for fetching the data
@param   array   $driverOptions  optional  driver specific arguments
@return  \stubbles\sequence\Sequence
return all result rows for given sql query