diff options
author | Shane Emmons <semmons99@gmail.com> | 2011-04-29 10:10:06 -0400 |
---|---|---|
committer | Shane Emmons <semmons99@gmail.com> | 2011-04-29 10:10:06 -0400 |
commit | c2e7f36f87184f23e9d83269ff20f99a29ec75ad (patch) | |
tree | fe0cd4b5f8e8acacf2a830a0032467c4878852d8 /lib/arel/visitors | |
parent | 909538048e17cea47f5c57f36ca103865ea17353 (diff) | |
download | rails-c2e7f36f87184f23e9d83269ff20f99a29ec75ad.tar.gz rails-c2e7f36f87184f23e9d83269ff20f99a29ec75ad.tar.bz2 rails-c2e7f36f87184f23e9d83269ff20f99a29ec75ad.zip |
replace 'LIMIT n' with 'FETCH FIRST n ROWS ONLY' when using ibm_db
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r-- | lib/arel/visitors/ibm_db.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/arel/visitors/ibm_db.rb b/lib/arel/visitors/ibm_db.rb new file mode 100644 index 0000000000..0c26a3ae9e --- /dev/null +++ b/lib/arel/visitors/ibm_db.rb @@ -0,0 +1,12 @@ +module Arel + module Visitors + class IBM_DB < Arel::Visitors::ToSql + private + + def visit_Arel_Nodes_Limit o + "FETCH FIRST #{visit o.expr} ROWS ONLY" + end + + end + end +end |