lib/bmg/algebra.rb in bmg-0.17.5 vs lib/bmg/algebra.rb in bmg-0.17.6
- old
+ new
@@ -170,9 +170,19 @@
def _summarize(type, by, summarization)
Operator::Summarize.new(type, self, by, summarization)
end
protected :_summarize
+ def transform(transformation = nil, options = {}, &proc)
+ transformation, options = proc, (transformation || {}) unless proc.nil?
+ _transform(self.type.transform(transformation, options), transformation, options)
+ end
+
+ def _transform(type, transformation, options)
+ Operator::Transform.new(type, self, transformation, options)
+ end
+ protected :_transform
+
def union(other, options = {})
return self if other.is_a?(Relation::Empty)
_union self.type.union(other.type), other, options
end