Sha256: 9b7240b5727fbb2b884a193b3a4484d3f91b6572891ea811e0810cdb45a715ff

Contents?: true

Size: 792 Bytes

Versions: 5

Compression:

Stored size: 792 Bytes

Contents

module Alf
  module Operator
    module Relational
      class Summarize
        include Relational, Unary

        signature do |s|
          s.argument :by,            AttrList, []
          s.argument :summarization, Summarization, {}
          s.option   :allbut,        Boolean, false, "Summarize on all but specified attributes?"
        end

        # (see Operator#compile)
        def compile
          if @allbut
            Engine::Summarize::Hash.new(operand, by, summarization, allbut)
          else
            op = Engine::Sort.new(operand, by.to_ordering)
            op = Engine::Summarize::Cesure.new(op, by, summarization, allbut)
            op
          end
        end
  
      end # class Summarize
    end # module Relational
  end # module Operator
end # module Alf

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-0.12.2 lib/alf/operator/relational/summarize.rb
alf-0.12.1 lib/alf/operator/relational/summarize.rb
alf-0.12.0 lib/alf/operator/relational/summarize.rb
alf-0.11.1 lib/alf/operator/relational/summarize.rb
alf-0.11.0 lib/alf/operator/relational/summarize.rb