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.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb
index 061e46a436..6aba31d94d 100644
--- a/lib/arel/visitors/to_sql.rb
+++ b/lib/arel/visitors/to_sql.rb
@@ -125,6 +125,7 @@ key on UpdateManager using UpdateManager#key=
[
"SELECT",
(visit(o.top) if o.top),
+ (visit(o.set_quantifier) if o.set_quantifier),
"#{o.projections.map { |x| visit x }.join ', '}",
visit(o.source),
("WHERE #{o.wheres.map { |x| visit x }.join ' AND ' }" unless o.wheres.empty?),
@@ -137,6 +138,10 @@ key on UpdateManager using UpdateManager#key=
visit o.expr
end
+ def visit_Arel_Nodes_Distinct o
+ 'DISTINCT'
+ end
+
def visit_Arel_Nodes_With o
"WITH #{o.children.map { |x| visit x }.join(', ')}"
end