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-2.1.0 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.2 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.1 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.0 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.0.RC10 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.0.RC9 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-1.7.1 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.0.RC8 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-1.7.0 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.0.RC7 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.0.RC6 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.0.RC5 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.0.RC4 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-1.6.0 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-1.5.1 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.0.RC3 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-1.5.0 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-1.5.0.RC2 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-1.5.0.RC1 lib/valkyrie/persistence/solr/queries/default_paginator.rb
valkyrie-2.0.0.RC1 lib/valkyrie/persistence/solr/queries/default_paginator.rb