1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/active_record/associations
Ryuta Kamizono c196ca72a0 Ensure StatementCache#execute never raises RangeError
Since 31ffbf8d, finder methods no longer raise `RangeError`. So
`StatementCache#execute` is the only place to raise the exception for
finder queries.

`StatementCache` is used for simple equality queries in the codebase.
This means that if `StatementCache#execute` raises `RangeError`, the
result could always be regarded as empty.
So `StatementCache#execute` just return nil in that range error case,
and treat that as empty in the caller side, then we can avoid catching
the exception in much places.
2019-01-18 16:01:14 +09:00
..
builder Fix call sites 2018-10-02 15:31:29 -04:00
join_dependency Avoid unneeded expanded column aliases array caching 2018-07-10 09:53:49 +09:00
preloader Don't unset foreign key when preloading missing record 2018-03-24 22:18:05 +00:00
alias_tracker.rb Fix alias confliction when joining same table on has many through with left_joins 2018-06-11 08:11:39 +09:00
association.rb Ensure StatementCache#execute never raises RangeError 2019-01-18 16:01:14 +09:00
association_scope.rb Reuse AR::Association#find_target method 2018-12-27 11:53:27 +02:00
belongs_to_association.rb Refactor counter cache to extract decrement_counters_before_last_save on the belongs_to association 2018-09-27 22:59:12 +09:00
belongs_to_polymorphic_association.rb Don't update counter cache unless the record is actually saved 2018-09-19 05:29:21 +09:00
collection_association.rb Merge pull request #34806 from bogdan/reuse-find-target 2018-12-27 19:40:10 +09:00
collection_proxy.rb Reset scope after collection delete 2018-12-04 00:16:42 -05:00
foreign_association.rb Refs #28025 nullify *_type column on polymorphic associations on :nu… (#28078) 2019-01-15 23:03:20 +09:00
has_many_association.rb Refs #28025 nullify *_type column on polymorphic associations on :nu… (#28078) 2019-01-15 23:03:20 +09:00
has_many_through_association.rb Ensure that delete_all on collection proxy returns affected count 2018-12-04 14:33:31 +09:00
has_one_association.rb Refs #28025 nullify *_type column on polymorphic associations on :nu… (#28078) 2019-01-15 23:03:20 +09:00
has_one_through_association.rb Don't expose SingularAssociation#replace which is internal API 2018-05-16 06:43:52 +09:00
join_dependency.rb Avoid unneeded expanded column aliases array caching 2018-07-10 09:53:49 +09:00
preloader.rb Restore preloaders_for_one method 2018-10-05 00:58:57 +09:00
singular_association.rb Ensure StatementCache#execute never raises RangeError 2019-01-18 16:01:14 +09:00
through_association.rb Initialization block is a part of build_record 2018-06-04 23:28:55 +09:00