src/Colorium/Orm/Mapper.php
public function raw($sql, array $values = [], $class = null)
    {
        return $this->execute($sql, $values, function(\PDOStatement $statement) use($class)
        {
            if($statement->columnCount() > 0) {
                return $class
                    ? $statement->fetchAll(\PDO::FETCH_CLASS | \PDO::FETCH_PROPS_LATE, $class)
                    : $statement->fetchAll(\PDO::FETCH_OBJ);
            }

            return $statement->rowCount();
        });
    }
public function raw($sql, array $values = [], $class = null)
    {
        return $this->execute($sql, $values, function(\PDOStatement $statement) use($class)
        {
            if($statement->columnCount() > 0) {
                return $class
                    ? $statement->fetchAll(\PDO::FETCH_CLASS | \PDO::FETCH_PROPS_LATE, $class)
                    : $statement->fetchAll(\PDO::FETCH_OBJ);
            }

            return $statement->rowCount();
        });
    }
Execute raw query

@param string $sql
@param array $values
@param string $class
@return mixed