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:
parent
3a994b9949
commit
5ca0c9a457
1 changed files with 8 additions and 0 deletions
|
@ -21,6 +21,14 @@ module Arel
|
|||
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)
|
||||
o.cores.any? do |core|
|
||||
core.projections.any? do |projection|
|
||||
|
|
Loading…
Reference in a new issue