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;
    }