Class: Alf::Algebra::Summarize
- Inherits:
-
Object
- Object
- Alf::Algebra::Summarize
- Includes:
- Operator, Relational, Unary
- Defined in:
- lib/alf-algebra/alf/algebra/operator/summarize.rb
Instance Attribute Summary
Attributes included from Operator
Attributes included from Support::Bindable
Instance Method Summary collapse
Methods included from Operator
#==, #bind, #dup, included, #initialize, #signature, #to_lispy, #to_relvar, #with_operands
Methods included from Support::Registry
decode_registered, #each, #listen, #listeners, #register, #registered
Methods included from Operand
#attr_list, coerce, #to_cog, #to_dot, #to_relation
Methods included from Support::Bindable
Methods included from Relational
Methods included from Unary
included, #operand, #with_operand
Instance Method Details
#heading ⇒ Object
12 13 14 15 16 17 |
# File 'lib/alf-algebra/alf/algebra/operator/summarize.rb', line 12 def heading @heading ||= begin op_h = operand.heading.project(by, allbut) op_h.merge(summarization.to_heading) end end |
#keys ⇒ Object
19 20 21 22 23 24 |
# File 'lib/alf-algebra/alf/algebra/operator/summarize.rb', line 19 def keys @keys ||= begin attrs = operand.heading.to_attr_list.project(by, allbut) operand.keys.select{|k| k.subset?(attrs) }.if_empty{ Keys[ attrs ] } end end |