diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-01 07:55:47 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-01 07:55:47 -0700 |
commit | a35fede61ac1a2fcff519ad052f2fcb8808922b9 (patch) | |
tree | 3cfb5968941e8979ebdfe12c2884398b65f7c8b6 /lib/arel/visitors/to_sql.rb | |
parent | dbe1f8b29a80bf07aa5df624f68b9de869c1f248 (diff) | |
parent | 4cb02380116b102142f85d92b7923c11882f94c7 (diff) | |
download | rails-a35fede61ac1a2fcff519ad052f2fcb8808922b9.tar.gz rails-a35fede61ac1a2fcff519ad052f2fcb8808922b9.tar.bz2 rails-a35fede61ac1a2fcff519ad052f2fcb8808922b9.zip |
Merge pull request #252 from stephenprater/right_and_full_outer_joins
Added right and full outer joins
Diffstat (limited to 'lib/arel/visitors/to_sql.rb')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 |