Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #160 from t0m/issue_99_oracle_optimization

Small change to oracle paging code to trigger stopkey optimization
  • Loading branch information...
commit d8005bcb892b0a41901da2cc4baf5e15706cb583 2 parents e6ec4ab + 78977c9
@rafaelfranca rafaelfranca authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/arel/visitors/oracle.rb
  2. +1 −1  test/visitors/test_oracle.rb
View
2  lib/arel/visitors/oracle.rb
@@ -26,7 +26,7 @@ def visit_Arel_Nodes_SelectStatement o
SELECT raw_sql_.*, rownum raw_rnum_
FROM (#{sql}) raw_sql_
)
- WHERE raw_rnum_ between #{offset.expr.to_i + 1 } and #{offset.expr.to_i + limit}
+ WHERE raw_rnum_ >= #{offset.expr.to_i + 1 } and rownum <= #{limit}
eosql
end
View
2  test/visitors/test_oracle.rb
@@ -103,7 +103,7 @@ module Visitors
SELECT raw_sql_.*, rownum raw_rnum_
FROM (SELECT) raw_sql_
)
- WHERE raw_rnum_ between 11 and 20
+ WHERE raw_rnum_ >= 11 and rownum <= 10
}
end
Please sign in to comment.
Something went wrong with that request. Please try again.