lib/alf/operator/relational/wrap.rb in alf-0.10.1 vs lib/alf/operator/relational/wrap.rb in alf-0.11.0
- old
+ new
@@ -1,22 +1,20 @@
module Alf
- module Operator::Relational
- class Wrap < Alf::Operator()
- include Operator::Relational, Operator::Transform
-
- signature do |s|
- s.argument :attributes, AttrList, []
- s.argument :as, AttrName, :wrapped
- end
-
- protected
-
- # (see Operator::Transform#_tuple2tuple)
- def _tuple2tuple(tuple)
- wrapped, others = @attributes.split(tuple)
- others[@as] = wrapped
- others
- end
-
- end # class Wrap
- end # module Operator::Relational
+ module Operator
+ module Relational
+ class Wrap
+ include Relational, Unary
+
+ signature do |s|
+ s.argument :attributes, AttrList, []
+ s.argument :as, AttrName, :wrapped
+ end
+
+ # (see Operator#compile)
+ def compile
+ Engine::Wrap.new(operand, attributes, as, false)
+ end
+
+ end # class Wrap
+ end # module Relational
+ end # module Operator
end # module Alf