diff options
-rw-r--r-- | lib/arel/visitors/postgresql.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/arel/visitors/postgresql.rb b/lib/arel/visitors/postgresql.rb index 87fc3bd60d..5e03f40984 100644 --- a/lib/arel/visitors/postgresql.rb +++ b/lib/arel/visitors/postgresql.rb @@ -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| |