Sha256: 049d9d095e4d775596f0bd19431a890c3cd87f0601d87fb899a2b112a9011a77
Contents?: true
Size: 1011 Bytes
Versions: 3
Compression:
Stored size: 1011 Bytes
Contents
module ActiveRecord module ConnectionAdapters module SQLite3 module Quoting # :nodoc: def quote_string(s) @connection.class.quote(s) end def quote_table_name_for_assignment(table, attr) quote_column_name(attr) end def quote_column_name(name) @quoted_column_names[name] ||= %Q("#{super.gsub('"', '""')}").freeze end def quoted_time(value) quoted_date(value).sub(/\A\d\d\d\d-\d\d-\d\d /, "2000-01-01 ") end def quoted_binary(value) "x'#{value.hex}'" end private def _type_cast(value) case value when BigDecimal value.to_f when String if value.encoding == Encoding::ASCII_8BIT super(value.encode(Encoding::UTF_8)) else super end else super end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems