public function buildCursor($db = null)
    {
        $this->prepare();

        $options = $this->options;
        if (!empty($this->orderBy)) {
            $options['sort'] = $this->orderBy;
        }
        $options['limit'] = $this->limit;
        $options['skip'] = $this->offset;

        $cursor = $this->getCollection($db)->find($this->composeCondition(), $this->select, $options);

        return $cursor;
    }
public function buildCursor($db = null)
    {
        $this->prepare();

        $options = $this->options;
        if (!empty($this->orderBy)) {
            $options['sort'] = $this->orderBy;
        }
        $options['limit'] = $this->limit;
        $options['skip'] = $this->offset;

        $cursor = $this->getCollection($db)->find($this->composeCondition(), $this->select, $options);

        return $cursor;
    }
public function buildCursor ( $ db = null ) { $ this -> prepare ( ) ; $ options = $ this -> options ; if ( ! empty ( $ this -> orderBy ) ) { $ options [ 'sort' ] = $ this -> orderBy ; } $ options [ 'limit' ] = $ this -> limit ; $ options [ 'skip' ] = $ this -> offset ; $ cursor = $ this -> getCollection ( $ db ) -> find ( $ this -> composeCondition ( ) , $ this -> select , $ options ) ; return $ cursor ; }
Builds the MongoDB cursor for this query.
@param Connection $db the MongoDB connection used to execute the query.
@return \MongoDB\Driver\Cursor mongo cursor instance.
Builds the MongoDB cursor for this query .