instance method _quote

Ruby on Rails 4.2.9

Since v4.2.9 Last seen in v6.1.7.10 Private

Available in: v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10

Signature

_quote(value)

No documentation comment.

Parameters

value req
Source
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 69
        def _quote(value)
          case value
          when Type::Binary::Data
            "'#{escape_bytea(value.to_s)}'"
          when OID::Xml::Data
            "xml '#{quote_string(value.to_s)}'"
          when OID::Bit::Data
            if value.binary?
              "B'#{value}'"
            elsif value.hex?
              "X'#{value}'"
            end
          when Float
            if value.infinite? || value.nan?
              "'#{value}'"
            else
              super
            end
          else
            super
          end
        end

Defined in activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb line 69 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting

Type at least 2 characters to search.

↑↓ navigate · open · esc close