MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / outerjoin

Method outerjoin

lib/sqlalchemy/sql/selectable.py:755–802  ·  view source on GitHub ↗

Return a :class:`_expression.Join` from this :class:`_expression.FromClause` to another :class:`FromClause`, with the "isouter" flag set to True. E.g.:: from sqlalchemy import outerjoin j = user_table.outerjoin( address_table

(
        self,
        right: _FromClauseArgument,
        onclause: Optional[_ColumnExpressionArgument[bool]] = None,
        full: bool = False,
    )

Source from the content-addressed store, hash-verified

753 return Join(self, right, onclause, isouter, full)
754
755 def outerjoin(
756 self,
757 right: _FromClauseArgument,
758 onclause: Optional[_ColumnExpressionArgument[bool]] = None,
759 full: bool = False,
760 ) -> Join:
761 """Return a :class:`_expression.Join` from this
762 :class:`_expression.FromClause`
763 to another :class:`FromClause`, with the "isouter" flag set to
764 True.
765
766 E.g.::
767
768 from sqlalchemy import outerjoin
769
770 j = user_table.outerjoin(
771 address_table, user_table.c.id == address_table.c.user_id
772 )
773
774 The above is equivalent to::
775
776 j = user_table.join(
777 address_table, user_table.c.id == address_table.c.user_id, isouter=True
778 )
779
780 :param right: the right side of the join; this is any
781 :class:`_expression.FromClause` object such as a
782 :class:`_schema.Table` object, and
783 may also be a selectable-compatible object such as an ORM-mapped
784 class.
785
786 :param onclause: a SQL expression representing the ON clause of the
787 join. If left at ``None``, :meth:`_expression.FromClause.join`
788 will attempt to
789 join the two tables based on a foreign key relationship.
790
791 :param full: if True, render a FULL OUTER JOIN, instead of
792 LEFT OUTER JOIN.
793
794 .. seealso::
795
796 :meth:`_expression.FromClause.join`
797
798 :class:`_expression.Join`
799
800 """ # noqa: E501
801
802 return Join(self, right, onclause, True, full)
803
804 def alias(
805 self, name: Optional[str] = None, flat: bool = False

Callers

nothing calls this directly

Calls 1

JoinClass · 0.85

Tested by

no test coverage detected