MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / foreign_keys

Method foreign_keys

lib/sqlalchemy/sql/selectable.py:968–982  ·  view source on GitHub ↗

Return the collection of :class:`_schema.ForeignKey` marker objects which this FromClause references. Each :class:`_schema.ForeignKey` is a member of a :class:`_schema.Table`-wide :class:`_schema.ForeignKeyConstraint`. .. seealso:: :attr:`_schem

(self)

Source from the content-addressed store, hash-verified

966
967 @util.ro_memoized_property
968 def foreign_keys(self) -> Iterable[ForeignKey]:
969 """Return the collection of :class:`_schema.ForeignKey` marker objects
970 which this FromClause references.
971
972 Each :class:`_schema.ForeignKey` is a member of a
973 :class:`_schema.Table`-wide
974 :class:`_schema.ForeignKeyConstraint`.
975
976 .. seealso::
977
978 :attr:`_schema.Table.foreign_key_constraints`
979
980 """
981 self._setup_collections()
982 return self.foreign_keys
983
984 def _reset_column_collection(self) -> None:
985 """Reset the attributes linked to the ``FromClause.c`` attribute.

Callers

nothing calls this directly

Calls 1

_setup_collectionsMethod · 0.95

Tested by

no test coverage detected