src/Arvici/Heart/Database/Driver/PDOConnection.php
public function raw($query, $return = false, $fetchMode = null, $fetchClass = null)
    {
        if (! $return) {
            return $this->exec($query);
        }

        $fetchMode = Database::normalizeFetchType($fetchMode);

        $statement = $this->query($query);

        if ($fetchMode === Database::FETCH_CLASS) {
            $statement->setFetchMode($fetchMode, $fetchClass);
        } else {
            $statement->setFetchMode($fetchMode);
        }

        return $statement->fetchAll();
    }
public function raw($query, $return = false, $fetchMode = null, $fetchClass = null)
    {
        if (! $return) {
            return $this->exec($query);
        }

        $fetchMode = Database::normalizeFetchType($fetchMode);

        $statement = $this->query($query);

        if ($fetchMode === Database::FETCH_CLASS) {
            $statement->setFetchMode($fetchMode, $fetchClass);
        } else {
            $statement->setFetchMode($fetchMode);
        }

        return $statement->fetchAll();
    }
public function raw ( $ query , $ return = false , $ fetchMode = null , $ fetchClass = null ) { if ( ! $ return ) { return $ this -> exec ( $ query ) ; } $ fetchMode = Database :: normalizeFetchType ( $ fetchMode ) ; $ statement = $ this -> query ( $ query ) ; if ( $ fetchMode === Database :: FETCH_CLASS ) { $ statement -> setFetchMode ( $ fetchMode , $ fetchClass ) ; } else { $ statement -> setFetchMode ( $ fetchMode ) ; } return $ statement -> fetchAll ( ) ; }
Execute query. Warning! No escaping!

@param string $query
@param bool $return Return something back? (Fetch)
@param int $fetchMode Fetch mode when returning something.
@param string $fetchClass Class to fetch

@return mixed

@throws \Exception
Execute query . Warning! No escaping!