Sha256: 6758ea014471118b306e778dd431953f3097a7746903e34c2a5d1efb89ef0074

Contents?: true

Size: 559 Bytes

Versions: 11

Compression:

Stored size: 559 Bytes

Contents

module Torque
  module PostgreSQL
    module Arel
      module Visitors

        # Enclose select manager with parenthesis
        # :TODO: Remove when checking the new version of Arel
        def visit_Arel_SelectManager o, collector
          collector << '('
          visit(o.ast, collector) << ')'
        end

        # Add ONLY modifier to query
        def visit_Arel_Nodes_JoinSource(o, collector)
          collector << 'ONLY ' if o.only?
          super
        end

      end

      ::Arel::Visitors::PostgreSQL.include Visitors
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
torque-postgresql-0.2.16 lib/torque/postgresql/arel/visitors.rb
torque-postgresql-0.2.15 lib/torque/postgresql/arel/visitors.rb
torque-postgresql-0.2.14 lib/torque/postgresql/arel/visitors.rb
torque-postgresql-0.2.13 lib/torque/postgresql/arel/visitors.rb
torque-postgresql-0.2.12 lib/torque/postgresql/arel/visitors.rb
torque-postgresql-0.2.11 lib/torque/postgresql/arel/visitors.rb
torque-postgresql-0.2.10 lib/torque/postgresql/arel/visitors.rb
torque-postgresql-0.2.9 lib/torque/postgresql/arel/visitors.rb
torque-postgresql-0.2.8 lib/torque/postgresql/arel/visitors.rb
torque-postgresql-0.2.7 lib/torque/postgresql/arel/visitors.rb
torque-postgresql-0.2.6 lib/torque/postgresql/arel/visitors.rb