diff options
Diffstat (limited to 'lib/arel/visitors/postgresql.rb')
-rw-r--r-- | lib/arel/visitors/postgresql.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/arel/visitors/postgresql.rb b/lib/arel/visitors/postgresql.rb index 7520a1ccc7..812710181c 100644 --- a/lib/arel/visitors/postgresql.rb +++ b/lib/arel/visitors/postgresql.rb @@ -3,18 +3,16 @@ module Arel class PostgreSQL < Arel::Visitors::ToSql private - def visit_Arel_Nodes_Matches o, a - a = o.left if Arel::Attributes::Attribute === o.left - "#{visit o.left, a} ILIKE #{visit o.right, a}" + def visit_Arel_Nodes_Matches o + "#{visit o.left} ILIKE #{visit o.right}" end - def visit_Arel_Nodes_DoesNotMatch o, a - a = o.left if Arel::Attributes::Attribute === o.left - "#{visit o.left, a} NOT ILIKE #{visit o.right, a}" + def visit_Arel_Nodes_DoesNotMatch o + "#{visit o.left} NOT ILIKE #{visit o.right}" end - def visit_Arel_Nodes_DistinctOn o, a - "DISTINCT ON ( #{visit o.expr, a} )" + def visit_Arel_Nodes_DistinctOn o + "DISTINCT ON ( #{visit o.expr} )" end end end |