aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/factory_methods.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/arel/factory_methods.rb')
-rw-r--r--activerecord/lib/arel/factory_methods.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/arel/factory_methods.rb b/activerecord/lib/arel/factory_methods.rb
index b828bc274e..83ec23e403 100644
--- a/activerecord/lib/arel/factory_methods.rb
+++ b/activerecord/lib/arel/factory_methods.rb
@@ -41,5 +41,9 @@ module Arel # :nodoc: all
def lower(column)
Nodes::NamedFunction.new "LOWER", [Nodes.build_quoted(column)]
end
+
+ def coalesce(*exprs)
+ Nodes::NamedFunction.new "COALESCE", exprs
+ end
end
end