MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / foreign_keys

Method foreign_keys

lib/sqlalchemy/sql/selectable.py:999–1013  ·  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

997
998 @util.ro_memoized_property
999 def foreign_keys(self) -> Iterable[ForeignKey]:
1000 """Return the collection of :class:`_schema.ForeignKey` marker objects
1001 which this FromClause references.
1002
1003 Each :class:`_schema.ForeignKey` is a member of a
1004 :class:`_schema.Table`-wide
1005 :class:`_schema.ForeignKeyConstraint`.
1006
1007 .. seealso::
1008
1009 :attr:`_schema.Table.foreign_key_constraints`
1010
1011 """
1012 self._setup_collections()
1013 return self.foreign_keys
1014
1015 def _reset_column_collection(self) -> None:
1016 """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