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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/arel/visitors/ibm_db.rb b/activerecord/lib/arel/visitors/ibm_db.rb
index 0a06aef60b..73166054da 100644
--- a/activerecord/lib/arel/visitors/ibm_db.rb
+++ b/activerecord/lib/arel/visitors/ibm_db.rb
@@ -10,6 +10,12 @@ module Arel # :nodoc: all
collector = visit o.expr, collector
collector << " ROWS ONLY"
end
+
+ def is_distinct_from(o, collector)
+ collector << "DECODE("
+ collector = visit [o.left, o.right, 0, 1], collector
+ collector << ")"
+ end
end
end
end