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/test/cases/arel/nodes/insert_statement_test.rb | |
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/test/cases/arel/nodes/insert_statement_test.rb')
-rw-r--r-- | activerecord/test/cases/arel/nodes/insert_statement_test.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/activerecord/test/cases/arel/nodes/insert_statement_test.rb b/activerecord/test/cases/arel/nodes/insert_statement_test.rb index 036576b231..252a0d0d0b 100644 --- a/activerecord/test/cases/arel/nodes/insert_statement_test.rb +++ b/activerecord/test/cases/arel/nodes/insert_statement_test.rb @@ -23,11 +23,9 @@ describe Arel::Nodes::InsertStatement do statement1 = Arel::Nodes::InsertStatement.new statement1.columns = %w[a b c] statement1.values = %w[x y z] - statement1.comment = Arel::Nodes::Comment.new(["comment"]) statement2 = Arel::Nodes::InsertStatement.new statement2.columns = %w[a b c] statement2.values = %w[x y z] - statement2.comment = Arel::Nodes::Comment.new(["comment"]) array = [statement1, statement2] assert_equal 1, array.uniq.size end @@ -36,15 +34,9 @@ describe Arel::Nodes::InsertStatement do statement1 = Arel::Nodes::InsertStatement.new statement1.columns = %w[a b c] statement1.values = %w[x y z] - statement1.comment = Arel::Nodes::Comment.new(["comment"]) statement2 = Arel::Nodes::InsertStatement.new statement2.columns = %w[a b c] statement2.values = %w[1 2 3] - statement2.comment = Arel::Nodes::Comment.new(["comment"]) - array = [statement1, statement2] - assert_equal 2, array.uniq.size - statement2.values = %w[x y z] - statement2.comment = Arel::Nodes::Comment.new("other") array = [statement1, statement2] assert_equal 2, array.uniq.size end |