Commit fbfb52a
committed
Lazy load type mappings
This appears to fix issue #2256. I believe it should have the same memory implications as the intention in #2199. The type maps are loaded once when they are first called. Only one instance of the mapping is ever created.
Fortunately this was enough to solve the problem, but if there were a need, this could easily be worked into the clear_cache! API to reset it at a later point in the application just by setting the @type_map to nil.1 parent 04841ad commit fbfb52a
File tree
2 files changed
+23
-3
lines changed- lib/active_record/connection_adapters
- spec/active_record/oracle_enhanced/type
2 files changed
+23
-3
lines changedLines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
462 | 467 | | |
463 | 468 | | |
464 | 469 | | |
| |||
697 | 702 | | |
698 | 703 | | |
699 | 704 | | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
700 | 714 | | |
701 | 715 | | |
702 | 716 | | |
| |||
730 | 744 | | |
731 | 745 | | |
732 | 746 | | |
733 | | - | |
734 | | - | |
735 | 747 | | |
736 | | - | |
| 748 | + | |
737 | 749 | | |
738 | 750 | | |
739 | 751 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
90 | 98 | | |
91 | 99 | | |
0 commit comments