method

_quote

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveRecord::ConnectionAdapters::Quoting

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.1.7.7) is shown here.

_quote(value) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 226
        def _quote(value)
          case value
          when String, Symbol, ActiveSupport::Multibyte::Chars
            "'#{quote_string(value.to_s)}'"
          when true       then quoted_true
          when false      then quoted_false
          when nil        then "NULL"
          # BigDecimals need to be put in a non-normalized form and quoted.
          when BigDecimal then value.to_s("F")
          when Numeric, ActiveSupport::Duration then value.to_s
          when Type::Binary::Data then quoted_binary(value)
          when Type::Time::Value then "'#{quoted_time(value)}'"
          when Date, Time then "'#{quoted_date(value)}'"
          when Class      then "'#{value}'"
          else raise TypeError, "can't quote #{value.class.name}"
          end
        end
Register or log in to add new notes.