aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/type/hash_lookup_type_map.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-131-1/+0
| | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* 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
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-3/+3
|
* Reduce memory usage when loading types in PGSean Griffin2015-03-291-2/+8
| | | | | | | | | | | | | We were never clearing the `PG::Result` object used to query the types when the connection is first established. This would lead to a potentially large amount of memory being retained for the life of the connection. Investigating this issue also revealed several low hanging fruit on the performance of these methods, and the number of allocations has been reduced by ~90%. Fixes #19578
* Reintroduce cache with testsSean Griffin2014-11-191-4/+6
|
* Add tests for `TypeMap#fetch` and push up to `TypeMap`Sean Griffin2014-11-191-4/+0
| | | | | | | It doesn't make sense for the subclass to implement this method, and not have it on the parent. We can also DRY up the implementation of `#lookup` to be defined in terms of fetch, which will give us a single point of entry
* Revert "PERF: optimise type lookup to avoid invoking procs"Sean Griffin2014-11-191-19/+1
| | | | This reverts commit da99a2a2982d35f670ad9647463e09bfe9032b70.
* PERF: optimise type lookup to avoid invoking procsSam2014-11-171-1/+19
|
* Move types to the top level `ActiveRecord` namespaceSean Griffin2014-05-271-0/+19
`ActiveRecord::ConnectionAdapters::Type::Value` => `ActiveRecord::Type::Value`