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

Method column_keys

lib/sqlalchemy/sql/schema.py:4810–4826  ·  view source on GitHub ↗

Return a list of string keys representing the local columns in this :class:`_schema.ForeignKeyConstraint`. This list is either the original string arguments sent to the constructor of the :class:`_schema.ForeignKeyConstraint`, or if the constraint has been initialize

(self)

Source from the content-addressed store, hash-verified

4808
4809 @property
4810 def column_keys(self) -> _typing_Sequence[str]:
4811 """Return a list of string keys representing the local
4812 columns in this :class:`_schema.ForeignKeyConstraint`.
4813
4814 This list is either the original string arguments sent
4815 to the constructor of the :class:`_schema.ForeignKeyConstraint`,
4816 or if the constraint has been initialized with :class:`_schema.Column`
4817 objects, is the string ``.key`` of each element.
4818
4819 """
4820 if hasattr(self, "parent"):
4821 return self._columns.keys()
4822 else:
4823 return [
4824 col.key if isinstance(col, ColumnElement) else str(col)
4825 for col in self._pending_colargs
4826 ]
4827
4828 @property
4829 def _col_description(self) -> str:

Callers

nothing calls this directly

Calls 1

keysMethod · 0.45

Tested by

no test coverage detected