1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Make PostgreSQL play nice with its friends. (matches -> ILIKE instead of LIKE)

This commit is contained in:
Ernie Miller 2010-09-29 15:50:24 -04:00
parent 3a994b9949
commit 5ca0c9a457

View file

@ -21,6 +21,14 @@ module Arel
end end
end end
def visit_Arel_Nodes_Matches o
"#{visit o.left} ILIKE #{visit o.right}"
end
def visit_Arel_Nodes_DoesNotMatch o
"#{visit o.left} NOT ILIKE #{visit o.right}"
end
def using_distinct_on?(o) def using_distinct_on?(o)
o.cores.any? do |core| o.cores.any? do |core|
core.projections.any? do |projection| core.projections.any? do |projection|