diff options
Diffstat (limited to 'lib/sqlalchemy/sql/selectable.py')
-rw-r--r-- | lib/sqlalchemy/sql/selectable.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index b4f6c8bc9..8e478583f 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -3944,7 +3944,7 @@ class SelectState(util.MemoizedSlots, CompileState): replace_from_obj_index = None - from_clauses = self.statement._from_obj + from_clauses = self.from_clauses if from_clauses: @@ -4644,6 +4644,19 @@ class Select( (target, onclause, None, {"isouter": isouter, "full": full}), ) + def outerjoin_from(self, from_, target, onclause=None, full=False): + r"""Create a SQL LEFT OUTER JOIN against this :class:`_expression.Select` + object's criterion + and apply generatively, returning the newly resulting + :class:`_expression.Select`. + + Usage is the same as that of :meth:`_selectable.Select.join_from`. + + """ + return self.join_from( + from_, target, onclause=onclause, isouter=True, full=full + ) + @_generative def join_from( self, from_, target, onclause=None, isouter=False, full=False |