Sha256: fc64658f89ea38b64f66fdb7b2e42416aba290b567bdb2ab5e5e486e283ca009

Contents?: true

Size: 1002 Bytes

Versions: 47

Compression:

Stored size: 1002 Bytes

Contents

# frozen_string_literal: true
module Valkyrie::Persistence::Solr::Queries
  # Acts as a null object representing the default case for paginating over solr
  # results. Often only used for the first iteration of a loop, or to retrieve
  # all Documents in an index.
  class DefaultPaginator
    # Default parameter for the next page in search results in a Solr query request
    # @see https://lucene.apache.org/solr/guide/pagination-of-results.html
    # @return [Integer]
    def next_page
      1
    end

    # Default parameter for the number of documents in a page of search results in a Solr query request
    # @see https://lucene.apache.org/solr/guide/pagination-of-results.html
    # @return [Integer]
    def per_page
      100
    end

    # Default state for the whether or not additional pages of search results in a Solr query response exist
    # @see https://lucene.apache.org/solr/guide/pagination-of-results.html
    # @return [Boolean]
    def has_next?
      true
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
valkyrie-3.5.0 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.4.0 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.3.0 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.1.5 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.1.4 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.1.3 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.1.2 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.1.1 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.1.0 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.0.3 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.0.2 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.0.1 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.0.0 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.0.0.pre.rc.1 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.0.0.pre.beta.3 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.0.0.pre.beta.2 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-3.0.0.pre.beta.1 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.2.0 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.1.2 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.1.1 lib/valkyrie/persistence/solr/queries/default_paginator.rb