aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/visitors/ibm_db.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/arel/visitors/ibm_db.rb')
-rw-r--r--activerecord/lib/arel/visitors/ibm_db.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/lib/arel/visitors/ibm_db.rb b/activerecord/lib/arel/visitors/ibm_db.rb
new file mode 100644
index 0000000000..e85a5a08a7
--- /dev/null
+++ b/activerecord/lib/arel/visitors/ibm_db.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+module Arel
+ module Visitors
+ class IBM_DB < Arel::Visitors::ToSql
+ private
+
+ def visit_Arel_Nodes_Limit o, collector
+ collector << "FETCH FIRST "
+ collector = visit o.expr, collector
+ collector << " ROWS ONLY"
+ end
+
+ end
+ end
+end