public function select($query, array $bindings=[], $fetchMode=null)
    {
        $fetchMode = $fetchMode === null
                     ? $this->getOption(static::FETCH_MODE)
                     : $fetchMode;

        $this->callBeforeListeners('select',[$query, $bindings]);

        $statement = $bindings
                     ? $this->prepared($query, $bindings, $fetchMode)
                     : $this->selectRaw($query, $fetchMode);

        $this->callAfterListeners('select',[$query, $bindings, $statement]);

        return new PDOResult($statement, $this);

    }
public function select($query, array $bindings=[], $fetchMode=null)
    {
        $fetchMode = $fetchMode === null
                     ? $this->getOption(static::FETCH_MODE)
                     : $fetchMode;

        $this->callBeforeListeners('select',[$query, $bindings]);

        $statement = $bindings
                     ? $this->prepared($query, $bindings, $fetchMode)
                     : $this->selectRaw($query, $fetchMode);

        $this->callAfterListeners('select',[$query, $bindings, $statement]);

        return new PDOResult($statement, $this);

    }
public function select ( $ query , array $ bindings = [ ] , $ fetchMode = null ) { $ fetchMode = $ fetchMode === null ? $ this -> getOption ( static :: FETCH_MODE ) : $ fetchMode ; $ this -> callBeforeListeners ( 'select' , [ $ query , $ bindings ] ) ; $ statement = $ bindings ? $ this -> prepared ( $ query , $ bindings , $ fetchMode ) : $ this -> selectRaw ( $ query , $ fetchMode ) ; $ this -> callAfterListeners ( 'select' , [ $ query , $ bindings , $ statement ] ) ; return new PDOResult ( $ statement , $ this ) ; }
Run a select statement and return the result.

@param string|\Ems\Contracts\Core\Stringable $query
@param array                                 $bindings (optional)
@param mixed                                 $fetchMode (optional)

@return PDOResult

@throws \Ems\Contracts\Core\Errors\UnSupported
Run a select statement and return the result .