Adds the pagination limits to the builder
547485
protected function addLimits()
    {
        if (isset($_POST[static::$versionTransformer->transform(
                    'start'
                )]) && $_POST[static::$versionTransformer->transform('length')] != '-1'
        ) {
            $this->builder->skip((int)$_POST[static::$versionTransformer->transform('start')])->take(
                (int)$_POST[static::$versionTransformer->transform('length')]
            );
        }
    }
994647
def paginate(self, request):
        """"""
        return self.collection.offset(self.offset).limit(self.limit)
930262
public static Builder builder() {
    return new AutoValue_OffsetPaginationConfiguration.Builder()
        .setDefaultOffset(0L)
        .setDefaultLimit(20)
        .setMaxLimit(100)
        .setLimitFieldName("limit")
        .setOffsetFieldName("offset")
        .setAllowZeroLimit(false);
  }
465682
private function appendLimitAndOffset(QueryBuilder $builder, $limit, $offset)
    {
        $limit = (int) $limit;
        $offset = (int) $offset;

        if ($limit > 0) {
            $builder->limit($limit);
        }

        if ($offset > 0) {
            $builder->skip($offset);
        }
        return $this;
    }
1140541
def pagination_for(list, options={})
      if list.respond_to? :total_pages
        options = {
          max_per_page: detail['pagination.max_per_page'] || 500,
          depaginate: true
        }.merge(options.symbolize_keys)
        depaginate = options.delete(:depaginate)                                     # supply depaginate: false to omit the 'show all' link
        depagination_limit = options.delete(:max_per_page)                           # supply max_per_page: false to include the 'show all' link no matter how large the collection
        html = will_paginate(list, will_paginate_options.merge(options))
        if depaginate && list.total_pages > 1 && (!depagination_limit.blank? || list.total_entries <= depagination_limit.to_i)
          html << content_tag(:div, link_to(t('show_all'), pp: 'all'), class: 'depaginate')
        elsif depaginate && list.total_entries > depagination_limit.to_i
          html = content_tag(:div, link_to("paginate", p: 1), class: 'pagination')
        end
        html
      end
    end
1282305
private void onLimit(StringBuilder builder) {
        if (Integer.MAX_VALUE != maxResult) {
            builder.append(CQLTranslator.LIMIT);
            builder.append(isSingleResult ? 1 : this.maxResult);
        }
    }
699782
private function buildLimit() {
        $this->getCriteria()->limit($this->getIndexCriteria()->getLimit(), $this->getIndexCriteria()->getOffset());
    }
800969
public function paginate(Builder $builder, $perPage, $page)
    {
        $builder->limit = $perPage;
        $builder->offset = ($perPage * $page) - $perPage;

        return $this->search($builder);
    }
1007005
def limit options = {}
      # Remove this key if we come from limit_page method.
      page = options.delete :page
      query = options.dup
      collection = new_collection scoped_query( options = {
        :limit => options[:limit],
        :offset => options[:offset],
        :order => [options[:order]]
      }.merge( query ) )
      options.merge! :count => calculate_total_records( query ), :page => page
      collection.paginator = DataMapper::Paginator::Main.new options
      collection
    end
1216507
def pagination(title, options, collection, &block)
      start_line, options[:limit], options[:header] = pagination_limit(title, options)
      if collection.size > (options[:limit] - options[:header]) # minus pagination header
        key   = Device::IO.back_key
        pages = pagination_page(collection, options[:limit] - options[:header]) # minus pagination header
        page  = 1
        while(key == Device::IO.back_key || key == Device::IO.forward_key)
          Device::Display.clear
          pagination_header(title, page, pages.size, start_line, options[:default], options[:header])
          values = pages[page].to_a
          block.call(values, start_line + options[:header])
          key  = try_key(pagination_keys(values.size, true))
          page = pagination_key_page(page, key, pages.size)
        end
      else
        Device::Display.clear
        print_title(title, options[:default]) if title
        values = collection.to_a
        block.call(values, start_line)
        key = try_key(pagination_keys(collection.size, false))
      end
      result = values[key.to_i-1] if key.integer?
      if result.is_a? Array
        [key, result[1]]
      else
        [key, result]
      end
    end
1263577
public function bindLimit()
    {
        if ($this->limit !== null) {            
            $this->sqlQuery->bindValue($this->positioningMarker, $this->limit, PDO::PARAM_INT);
            $this->positioningMarker++;
            $this->sqlQuery->bindValue($this->positioningMarker, $this->offset, PDO::PARAM_INT);
        }

        return $this;
    }
192115
def limit(value = nil, &block)
      chain { criteria.update_request_options size: block || Integer(value) }
    end
189244
public function addPage()
    {
        $this->pageN++;

        // Add a little margin to max Y "between pages"
        $this->maxY += 10;

        // If Y is still heigher by any reason...
        if ($this->maxY < $this->Y) {
            // ... update max Y
            $this->maxY = $this->Y;
        } else {
            // else update Y so that nothing will be overwritten, like images or cells...
            $this->Y = $this->maxY;
        }
    }
1306369
protected void addFacetOptions(StringBuffer query, final boolean useLimit) {

        // mincount
        if (m_config.getMinCount() != null) {
            appendFacetOption(query, "mincount", m_config.getMinCount().toString());
        }
        // limit
        if (useLimit && (m_config.getLimit() != null)) {
            appendFacetOption(query, "limit", m_config.getLimit().toString());
        }
        // sort
        if (m_config.getSortOrder() != null) {
            appendFacetOption(query, "sort", m_config.getSortOrder().toString());
        }
        // prefix
        if (!m_config.getPrefix().isEmpty()) {
            appendFacetOption(query, "prefix", m_config.getPrefix());
        }
    }
981324
public QueryFilter withPage(int pageNumber, int amountPerPage) {
        parameters.put("page", pageNumber);
        parameters.put("per_page", amountPerPage);
        return this;
    }
264172
def init(req, model):  # pylint: disable=unused-argument
    

    limit = req.get_param('page[limit]') or goldman.config.PAGE_LIMIT
    offset = req.get_param('page[offset]') or 0

    try:
        return Paginator(limit, offset)
    except ValueError:
        raise InvalidQueryParams(**{
            'detail': 'The page[\'limit\'] & page[\'offset\'] query '
                      'params may only be specified once each & must '
                      'both be an integer >= 0.',
            'links': 'jsonapi.org/format/#fetching-pagination',
            'parameter': 'page',
        })
1264090
public function paginate($limit = null, $columns = ['*'], $pageName = 'page', $page = null)
    {
        return $this->simpleWrap(Action::READ, [$this, '_paginate']);
    }