aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb
Commit message (Collapse)AuthorAgeFilesLines
* Refactor around sql_type metadata and columnRyuta Kamizono2019-04-121-2/+1
| | | | | | * remove useless `@type_metadata` and `@array` * move the compatibility code (for array) into column * etc.
* Improve == and hash methods on various schema cache structs to be allocation ↵Jean Boussier2019-04-091-8/+5
| | | | | | | | free. The previous implementation would allocate 2 arrays per comparisons. I tried relying on Struct, but they do allocate one Hash inside `Struct#hash`.
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Suppress deprecation warning `implementing to_yaml is deprecated`Fumiaki MATSUSHIMA2017-02-151-0/+2
|
* Remove text default treated as an empty string in non-strict modeRyuta Kamizono2016-08-191-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Strict mode controls how MySQL handles invalid or missing values in data-change statements such as INSERT or UPDATE. If strict mode is not in effect, MySQL inserts adjusted values for invalid or missing values and produces warnings. ```ruby def test_mysql_not_null_defaults_non_strict using_strict(false) do with_mysql_not_null_table do |klass| record = klass.new assert_nil record.non_null_integer assert_nil record.non_null_string assert_nil record.non_null_text assert_nil record.non_null_blob record.save! record.reload assert_equal 0, record.non_null_integer assert_equal "", record.non_null_string assert_equal "", record.non_null_text assert_equal "", record.non_null_blob end end end ``` It is inconsistent with other types that only text/blob defaults treated as an empty string. This commit fixes the inconsistency.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-3/+3
|
* Extract `MySQL::TypeMetadata` class to ↵Ryuta Kamizono2016-01-111-0/+32
`connection_adapters/mysql/type_metadata.rb`