Sha256: 414d15002cafe1c36b5dad41306c07d1f5d29d6ee3ebd949003b635e0fb70549

Contents?: true

Size: 690 Bytes

Versions: 5

Compression:

Stored size: 690 Bytes

Contents

module Alf
  module Algebra
    class Page
      include Operator
      include Relational
      include Unary
      include WithOrdering

      signature do |s|
        s.argument :ordering, Ordering, []
        s.argument :page_index, Integer, 1
        s.option   :page_size,  Integer, 25, 'Size of the pages to compute'
      end

      def heading
        operand.heading
      end

      def keys
        operand.keys
      end

    private

      def _type_check(options)
        valid_ordering!(ordering, operand.attr_list)
        type_check_error!("invalid page size `#{page_size}`")   unless page_size >= 0
      end

    end # class Page
  end # module Algebra
end # module Alf

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-core-0.16.3 lib/alf/algebra/operator/page.rb
alf-core-0.16.2 lib/alf/algebra/operator/page.rb
alf-core-0.16.1 lib/alf/algebra/operator/page.rb
alf-core-0.16.0 lib/alf/algebra/operator/page.rb
alf-core-0.15.0 lib/alf/algebra/operator/page.rb