lib/alf/operator/relational/extend.rb in alf-0.10.1 vs lib/alf/operator/relational/extend.rb in alf-0.11.0

- old
+ new

@@ -1,24 +1,19 @@ module Alf - module Operator::Relational - class Extend < Alf::Operator() - include Operator::Relational, Operator::Transform - - signature do |s| - s.argument :ext, TupleComputation, {} - end - - protected - - # (see Operator#_prepare) - def _prepare - @handle = TupleHandle.new - end - - # (see Operator::Transform#_tuple2tuple) - def _tuple2tuple(tuple) - tuple.merge @ext.evaluate(@handle.set(tuple)) - end - - end # class Extend - end # module Operator::Relational + module Operator + module Relational + class Extend + include Relational, Unary + + signature do |s| + s.argument :ext, TupleComputation, {} + end + + # (see Operator#compile) + def compile + Engine::SetAttr.new(operand, ext) + end + + end # class Extend + end # module Relational + end # module Operator end # module Alf