lib/bmg/operator/autowrap.rb in bmg-0.18.1 vs lib/bmg/operator/autowrap.rb in bmg-0.18.2

- old
+ new

@@ -50,10 +50,16 @@ def to_ast [ :autowrap, operand.to_ast, @original_options.dup ] end + public ### for internal reasons + + def _count + operand._count + end + protected ### optimization def _autowrap(type, opts) if same_options?(opts) self @@ -90,15 +96,27 @@ if (wrapped_roots! & on).empty? operand.matching(right, on).autowrap(options) else super end + rescue UnknownAttributesError + super end def _page(type, ordering, page_index, opts) attrs = ordering.map{|(a,d)| a } if (wrapped_roots! & attrs).empty? operand.page(ordering, page_index, opts).autowrap(options) + else + super + end + rescue UnknownAttributesError + super + end + + def _project(type, attrlist) + if (wrapped_roots! & attrlist).empty? + operand.project(attrlist).autowrap(options) else super end rescue UnknownAttributesError super