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/arel
Ryuta Kamizono 1ac40f16c5 Move Arel attribute normalization into arel_table
In Active Record internal, `arel_table` is not directly used but
`arel_attribute` is used, since `arel_table` doesn't normalize an
attribute name as a string, and doesn't resolve attribute aliases.

For the above reason, `arel_attribute` should be used rather than
`arel_table`, but most people directly use `arel_table`, both
`arel_table` and `arel_attribute` are private API though.

Although I'd not recommend using private API, `arel_table` is actually
widely used, and it is also problematic for unscopeable queries and
hash-like relation merging friendly, as I explained at #39863.

To resolve the issue, this change moves Arel attribute normalization
(attribute name as a string, and attribute alias resolution) into
`arel_table`.
2020-07-19 23:41:24 +09:00
..
attributes Perf: Improve performance of where when using an array of values 2020-05-01 15:12:05 -04:00
collectors Add add_binds to bulk binds processing for performance 2020-05-11 03:24:49 +09:00
nodes Move Arel attribute normalization into arel_table 2020-07-19 23:41:24 +09:00
visitors Make where_sql more few code 2020-06-17 10:50:34 +09:00
alias_predication.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
crud.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
delete_manager.rb Handle DELETE with LIMIT in Arel 2018-09-30 21:21:54 +09:00
errors.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
expressions.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
factory_methods.rb Make update_counters preparable 2018-09-28 04:14:15 +09:00
insert_manager.rb Get rid of Arel::Nodes::Values 2019-03-18 03:57:16 +09:00
math.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
nodes.rb Implement equality? rather than inheriting Equality for In node 2020-06-21 07:35:17 +09:00
order_predications.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
predications.rb Fix AR::Relation#where_values_hash with HomogeousIn: 2020-05-15 01:39:19 +02:00
select_manager.rb Make where_sql more few code 2020-06-17 10:50:34 +09:00
table.rb Move Arel attribute normalization into arel_table 2020-07-19 23:41:24 +09:00
tree_manager.rb Revert unused code and re-using query annotation for update_all and delete_all 2019-04-01 15:04:11 +09:00
update_manager.rb Handle DELETE with LIMIT in Arel 2018-09-30 21:21:54 +09:00
visitors.rb Make where_sql more few code 2020-06-17 10:50:34 +09:00
window_predications.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30