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

Method references

lib/sqlalchemy/sql/schema.py:2270–2278  ·  view source on GitHub ↗

Return True if this Column references the given column via foreign key.

(self, column: Column[Any])

Source from the content-addressed store, hash-verified

2268 return self.description
2269
2270 def references(self, column: Column[Any]) -> bool:
2271 """Return True if this Column references the given column via foreign
2272 key."""
2273
2274 for fk in self.foreign_keys:
2275 if fk.column.proxy_set.intersection(column.proxy_set):
2276 return True
2277 else:
2278 return False
2279
2280 def append_foreign_key(self, fk: ForeignKey) -> None:
2281 fk._set_parent_with_dispatch(self)

Calls 1

intersectionMethod · 0.45