From c2e7f36f87184f23e9d83269ff20f99a29ec75ad Mon Sep 17 00:00:00 2001 From: Shane Emmons <semmons99@gmail.com> Date: Fri, 29 Apr 2011 10:10:06 -0400 Subject: replace 'LIMIT n' with 'FETCH FIRST n ROWS ONLY' when using ibm_db --- lib/arel/visitors/ibm_db.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/arel/visitors/ibm_db.rb (limited to 'lib/arel/visitors') 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 -- cgit v1.2.3