diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/visitors/oracle.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/arel/visitors/oracle.rb b/lib/arel/visitors/oracle.rb index 6a58a3cff2..375f7dbfe9 100644 --- a/lib/arel/visitors/oracle.rb +++ b/lib/arel/visitors/oracle.rb @@ -25,8 +25,9 @@ module Arel SELECT * FROM ( SELECT raw_sql_.*, rownum raw_rnum_ FROM (#{sql}) raw_sql_ + WHERE rownum <= #{offset.expr.to_i + limit} ) - WHERE raw_rnum_ >= #{offset.expr.to_i + 1 } and rownum <= #{limit} + WHERE #{visit offset} eosql end |