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
crud.rb
delete_manager.rb
errors.rb
expressions.rb
factory_methods.rb
insert_manager.rb Get rid of Arel::Nodes::Values 2019-03-18 03:57:16 +09:00
math.rb
nodes.rb Implement equality? rather than inheriting Equality for In node 2020-06-21 07:35:17 +09:00
order_predications.rb
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
visitors.rb Make where_sql more few code 2020-06-17 10:50:34 +09:00
window_predications.rb