diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-02-11 10:30:24 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-02-11 10:32:13 -0700 |
commit | c9cc1f47adbfe6bcdca37fb1d1338999219c7b74 (patch) | |
tree | edbaed0a2dcaed9268fcc516684b59a7f9dbceeb /activerecord/lib | |
parent | fcfca5c70023ab01388a87be49a4a33e29d6cd43 (diff) | |
download | rails-c9cc1f47adbfe6bcdca37fb1d1338999219c7b74.tar.gz rails-c9cc1f47adbfe6bcdca37fb1d1338999219c7b74.tar.bz2 rails-c9cc1f47adbfe6bcdca37fb1d1338999219c7b74.zip |
Remove the SQLite3 Binary subclass
As far as I can tell, the original reason that this behavior was added
has been sufficiently resolved elsewhere, as we no longer remove the
encoding of strings coming out of the database.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index edd060248f..400b586c95 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -41,15 +41,6 @@ module ActiveRecord end module ConnectionAdapters #:nodoc: - class SQLite3Binary < Type::Binary # :nodoc: - def cast_value(value) - if value.encoding != Encoding::ASCII_8BIT - value = value.force_encoding(Encoding::ASCII_8BIT) - end - value - end - end - # The SQLite3 adapter works SQLite 3.6.16 or newer # with the sqlite3-ruby drivers (available as gem from https://rubygems.org/gems/sqlite3). # @@ -240,10 +231,6 @@ module ActiveRecord end end - def type_classes_with_standard_constructor - super.merge(binary: SQLite3Binary) - end - def quote_string(s) #:nodoc: @connection.class.quote(s) end @@ -493,11 +480,6 @@ module ActiveRecord protected - def initialize_type_map(m) - super - m.register_type(/binary/i, SQLite3Binary.new) - end - def table_structure(table_name) structure = exec_query("PRAGMA table_info(#{quote_table_name(table_name)})", 'SCHEMA').to_hash raise(ActiveRecord::StatementInvalid, "Could not find table '#{table_name}'") if structure.empty? |