aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/visitors
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r--lib/arel/visitors/depth_first.rb2
-rw-r--r--lib/arel/visitors/dot.rb4
-rw-r--r--lib/arel/visitors/to_sql.rb8
3 files changed, 13 insertions, 1 deletions
diff --git a/lib/arel/visitors/depth_first.rb b/lib/arel/visitors/depth_first.rb
index 1770ab21d5..7043e5d527 100644
--- a/lib/arel/visitors/depth_first.rb
+++ b/lib/arel/visitors/depth_first.rb
@@ -67,6 +67,7 @@ module Arel
alias :visit_Arel_Nodes_DeleteStatement :binary
alias :visit_Arel_Nodes_DoesNotMatch :binary
alias :visit_Arel_Nodes_Equality :binary
+ alias :visit_Arel_Nodes_FullOuterJoin :binary
alias :visit_Arel_Nodes_GreaterThan :binary
alias :visit_Arel_Nodes_GreaterThanOrEqual :binary
alias :visit_Arel_Nodes_In :binary
@@ -80,6 +81,7 @@ module Arel
alias :visit_Arel_Nodes_NotIn :binary
alias :visit_Arel_Nodes_Or :binary
alias :visit_Arel_Nodes_OuterJoin :binary
+ alias :visit_Arel_Nodes_RightOuterJoin :binary
alias :visit_Arel_Nodes_TableAlias :binary
alias :visit_Arel_Nodes_Values :binary
diff --git a/lib/arel/visitors/dot.rb b/lib/arel/visitors/dot.rb
index b2fa6bfbd5..99f4c467d2 100644
--- a/lib/arel/visitors/dot.rb
+++ b/lib/arel/visitors/dot.rb
@@ -54,7 +54,9 @@ module Arel
visit_edge o, "left"
visit_edge o, "right"
end
- alias :visit_Arel_Nodes_OuterJoin :visit_Arel_Nodes_InnerJoin
+ alias :visit_Arel_Nodes_FullOuterJoin :visit_Arel_Nodes_InnerJoin
+ alias :visit_Arel_Nodes_OuterJoin :visit_Arel_Nodes_InnerJoin
+ alias :visit_Arel_Nodes_RightOuterJoin :visit_Arel_Nodes_InnerJoin
def visit_Arel_Nodes_DeleteStatement o
visit_edge o, "relation"
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb
index 0c2e649995..84a88e1899 100644
--- a/lib/arel/visitors/to_sql.rb
+++ b/lib/arel/visitors/to_sql.rb
@@ -446,10 +446,18 @@ module Arel
visit o.left
end
+ def visit_Arel_Nodes_FullOuterJoin o
+ "FULL OUTER JOIN #{visit o.left} #{visit o.right}"
+ end
+
def visit_Arel_Nodes_OuterJoin o
"LEFT OUTER JOIN #{visit o.left} #{visit o.right}"
end
+ def visit_Arel_Nodes_RightOuterJoin o
+ "RIGHT OUTER JOIN #{visit o.left} #{visit o.right}"
+ end
+
def visit_Arel_Nodes_InnerJoin o
s = "INNER JOIN #{visit o.left}"
if o.right