diff options
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/select_manager.rb | 5 | ||||
-rw-r--r-- | lib/arel/table.rb | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb index 804316209c..f1dde6403a 100644 --- a/lib/arel/select_manager.rb +++ b/lib/arel/select_manager.rb @@ -114,6 +114,10 @@ module Arel self end + def outer_join relation + join(relation, Nodes::OuterJoin) + end + def having *exprs @ctx.having = Nodes::Having.new(collapse(exprs, @ctx.having)) self @@ -148,6 +152,7 @@ module Arel else @ctx.set_quantifier = nil end + self end def order *expr diff --git a/lib/arel/table.rb b/lib/arel/table.rb index b87c526de5..545e73e3ae 100644 --- a/lib/arel/table.rb +++ b/lib/arel/table.rb @@ -64,6 +64,10 @@ primary_key (#{caller.first}) is deprecated and will be removed in Arel 4.0.0 from(self).join(relation, klass) end + def outer_join relation + join(relation, Nodes::OuterJoin) + end + def group *columns from(self).group(*columns) end |