activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
# Escapes binary strings for bytea input to the database.
Escapes binary strings for bytea input to the database.
Escapes binary strings for bytea input to the database .
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
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
Escapes binary strings for bytea input to the database.
Escapes binary strings for bytea input to the database .
value
<not_specific>