src/main/php/Database.php
public function fetchColumn(
            string $sql,
            array $values = [],
            int $columnIndex = 0
    ): Sequence {
        return $this->fetchAll(
                $sql,
                $values,
                \PDO::FETCH_COLUMN,
                ['columnIndex' => $columnIndex]
        );
    }
public function fetchColumn(
            string $sql,
            array $values = [],
            int $columnIndex = 0
    ): Sequence {
        return $this->fetchAll(
                $sql,
                $values,
                \PDO::FETCH_COLUMN,
                ['columnIndex' => $columnIndex]
        );
    }
public function fetchColumn ( string $ sql , array $ values = [ ] , int $ columnIndex = 0 ) : Sequence { return $ this -> fetchAll ( $ sql , $ values , \ PDO :: FETCH_COLUMN , [ 'columnIndex' => $ columnIndex ] ) ; }
return a list with all rows from given result

Allows to map the result into a list of values from one single column:
<code>
$userNames = $database->fetchColumn('SELECT username FROM users WHERE status = "blocked"');
</code>

@param   string  $sql          sql query to fetch data with
@param   array   $values       map of values in case $sql contains a prepared statement
@param   int     $columnIndex  number of column to fetch
@return  \stubbles\sequence\Sequence
return a list with all rows from given result