aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/visitors
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r--lib/arel/visitors/to_sql.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb
index 7143d4e76a..486c51a183 100644
--- a/lib/arel/visitors/to_sql.rb
+++ b/lib/arel/visitors/to_sql.rb
@@ -131,7 +131,6 @@ module Arel
end
if o.values
- collector << " VALUES"
maybe_visit o.values, collector
elsif o.select
maybe_visit o.select, collector
@@ -167,19 +166,8 @@ module Arel
collector << "FALSE"
end
- def visit_Arel_Nodes_Tuple o, collector
- len = o.values.length - 1
- o.values.each_with_index { |value, i|
- collector = visit value, collector
- unless i == len
- collector << COMMA
- end
- }
- collector
- end
-
def visit_Arel_Nodes_Values o, collector
- collector << "("
+ collector << "VALUES ("
len = o.expressions.length - 1
o.expressions.each_with_index { |value, i|