aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/visitors
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r--lib/arel/visitors/oracle.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/arel/visitors/oracle.rb b/lib/arel/visitors/oracle.rb
index 5808d7a511..7d62531afb 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.expr}"
end