diff options
Diffstat (limited to 'lib/arel/visitors/oracle.rb')
-rw-r--r-- | lib/arel/visitors/oracle.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/arel/visitors/oracle.rb b/lib/arel/visitors/oracle.rb index 3b452836db..d4749bbae3 100644 --- a/lib/arel/visitors/oracle.rb +++ b/lib/arel/visitors/oracle.rb @@ -29,12 +29,12 @@ module Arel collector = super(o, collector) if offset.expr.is_a? Nodes::BindParam - offset_bind = nil collector << ') raw_sql_ WHERE rownum <= (' - collector.add_bind(offset.expr) { |i| offset_bind = ":a#{i}" } + collector = visit offset.expr, collector collector << ' + ' - collector.add_bind(limit) { |i| ":a#{i}" } - collector << ") ) WHERE raw_rnum_ > #{offset_bind}" + collector = visit limit, collector + collector << ") ) WHERE raw_rnum_ > " + collector = visit offset.expr, collector return collector else collector << ") raw_sql_ @@ -145,7 +145,7 @@ module Arel end def visit_Arel_Nodes_BindParam o, collector - collector.add_bind(o) { |i| ":a#{i}" } + collector.add_bind(o.value) { |i| ":a#{i}" } end end |