diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-01 15:04:11 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-01 15:04:11 +0900 |
commit | 6e43a207c6d3072d10b494d605b7bb6635043e30 (patch) | |
tree | b2c0ac655273cb2fedc556f62e8f902ed1e0d15c /activerecord/lib/active_record | |
parent | 43866b2ca338375b964b0b905ee20f74f9b21b22 (diff) | |
download | rails-6e43a207c6d3072d10b494d605b7bb6635043e30.tar.gz rails-6e43a207c6d3072d10b494d605b7bb6635043e30.tar.bz2 rails-6e43a207c6d3072d10b494d605b7bb6635043e30.zip |
Revert unused code and re-using query annotation for `update_all` and `delete_all`
This partly reverts #35617.
#35617 includes unused code (for `InsertStatement`) and re-using query
annotation for `update_all` and `delete_all`, which has not been
discussed yet.
If a relation has any annotation, I think it is mostly for SELECT query,
so re-using annotation by default is not always desired behavior for me.
We should discuss about desired behavior before publishing the
implementation.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 36c2422d84..dd821431e1 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -389,8 +389,6 @@ module ActiveRecord stmt.set Arel.sql(klass.sanitize_sql_for_assignment(updates, table.name)) end - stmt.comment(*arel.comment_node.values) if arel.comment_node - @klass.connection.update stmt, "#{@klass} Update All" end @@ -506,7 +504,6 @@ module ActiveRecord stmt.offset(arel.offset) stmt.order(*arel.orders) stmt.wheres = arel.constraints - stmt.comment(*arel.comment_node.values) if arel.comment_node affected = @klass.connection.delete(stmt, "#{@klass} Destroy") |