diff options
Diffstat (limited to 'lib/arel/visitors/postgresql.rb')
-rw-r--r-- | lib/arel/visitors/postgresql.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/arel/visitors/postgresql.rb b/lib/arel/visitors/postgresql.rb index bd23fc0a47..75d2ad9c93 100644 --- a/lib/arel/visitors/postgresql.rb +++ b/lib/arel/visitors/postgresql.rb @@ -4,7 +4,8 @@ module Arel private def visit_Arel_Nodes_Matches o, collector - collector = infix_value o, collector, ' ILIKE ' + op = o.case_sensitive ? ' LIKE ' : ' ILIKE ' + collector = infix_value o, collector, op if o.escape collector << ' ESCAPE ' visit o.escape, collector @@ -14,7 +15,8 @@ module Arel end def visit_Arel_Nodes_DoesNotMatch o, collector - collector = infix_value o, collector, ' NOT ILIKE ' + op = o.case_sensitive ? ' NOT LIKE ' : ' NOT ILIKE ' + collector = infix_value o, collector, op if o.escape collector << ' ESCAPE ' visit o.escape, collector |