diff options
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/visitors/oracle.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/arel/visitors/oracle.rb b/lib/arel/visitors/oracle.rb index fa943b2904..87b8f10ef4 100644 --- a/lib/arel/visitors/oracle.rb +++ b/lib/arel/visitors/oracle.rb @@ -12,7 +12,6 @@ module Arel o.cores.last.wheres.push Nodes::LessThanOrEqual.new( Nodes::SqlLiteral.new('ROWNUM'), o.limit.expr ) - o.limit = nil return super end @@ -20,7 +19,6 @@ module Arel o = o.dup limit = o.limit.expr.to_i offset = o.offset - o.limit = nil o.offset = nil sql = super(o) return <<-eosql @@ -36,7 +34,6 @@ module Arel if o.limit o = o.dup limit = o.limit.expr - o.limit = nil return "SELECT * FROM (#{super(o)}) WHERE ROWNUM <= #{visit limit}" end @@ -57,6 +54,10 @@ module Arel super end + def visit_Arel_Nodes_Limit o + '' + end + def visit_Arel_Nodes_Offset o "raw_rnum_ > #{visit o.value}" end |