diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-03-18 03:09:00 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-03-18 03:57:16 +0900 |
commit | 187870db2fcc58aa0da8bb3f26711664fd5ed611 (patch) | |
tree | 9a6ee6843120b0a27948dc0f429004af70877729 /activerecord/lib/arel/visitors/to_sql.rb | |
parent | 98e380f02452ee2597d122c76fd6b3a802f73333 (diff) | |
download | rails-187870db2fcc58aa0da8bb3f26711664fd5ed611.tar.gz rails-187870db2fcc58aa0da8bb3f26711664fd5ed611.tar.bz2 rails-187870db2fcc58aa0da8bb3f26711664fd5ed611.zip |
Get rid of `Arel::Nodes::Values`
That is completely covered by `Arel::Nodes::ValuesList`.
Related https://github.com/rails/arel/pull/484.
Diffstat (limited to 'activerecord/lib/arel/visitors/to_sql.rb')
-rw-r--r-- | activerecord/lib/arel/visitors/to_sql.rb | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/activerecord/lib/arel/visitors/to_sql.rb b/activerecord/lib/arel/visitors/to_sql.rb index 7e3e265208..099bf5efb0 100644 --- a/activerecord/lib/arel/visitors/to_sql.rb +++ b/activerecord/lib/arel/visitors/to_sql.rb @@ -159,7 +159,7 @@ module Arel # :nodoc: all when Nodes::SqlLiteral, Nodes::BindParam collector = visit(value, collector) else - collector << quote(value) + collector << quote(value).to_s end collector << COMMA unless k == row_len end @@ -169,25 +169,6 @@ module Arel # :nodoc: all collector end - def visit_Arel_Nodes_Values(o, collector) - collector << "VALUES (" - - len = o.expressions.length - 1 - o.expressions.each_with_index { |value, i| - case value - when Nodes::SqlLiteral, Nodes::BindParam - collector = visit value, collector - else - collector << quote(value).to_s - end - unless i == len - collector << COMMA - end - } - - collector << ")" - end - def visit_Arel_Nodes_SelectStatement(o, collector) if o.with collector = visit o.with, collector |