Sha256: d49931925124831c130215080b0d0981a7efbe3f828a2ba1a0db49dfaf7b048f

Contents?: true

Size: 549 Bytes

Versions: 5

Compression:

Stored size: 549 Bytes

Contents

module Arel
  module Visitors
    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}"
      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}"
      end

      def visit_Arel_Nodes_DistinctOn o, a
        "DISTINCT ON ( #{visit o.expr, a} )"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/lib/arel/visitors/postgresql.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/lib/arel/visitors/postgresql.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/lib/arel/visitors/postgresql.rb
arel-5.0.1.20140414130214 lib/arel/visitors/postgresql.rb
arel-4.0.2 lib/arel/visitors/postgresql.rb