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

Method __init__

lib/sqlalchemy/sql/selectable.py:3150–3167  ·  view source on GitHub ↗
(self, name: str, *columns: ColumnClause[Any], **kw: Any)

Source from the content-addressed store, hash-verified

3148 return None
3149
3150 def __init__(self, name: str, *columns: ColumnClause[Any], **kw: Any):
3151 super().__init__()
3152 self.name = name
3153 self._columns = DedupeColumnCollection()
3154 self.primary_key = ColumnSet() # type: ignore
3155 self.foreign_keys = set() # type: ignore
3156 for c in columns:
3157 self.append_column(c)
3158
3159 schema = kw.pop("schema", None)
3160 if schema is not None:
3161 self.schema = schema
3162 if self.schema is not None:
3163 self.fullname = "%s.%s" % (self.schema, self.name)
3164 else:
3165 self.fullname = self.name
3166 if kw:
3167 raise exc.ArgumentError("Unsupported argument(s): %s" % list(kw))
3168
3169 if TYPE_CHECKING:
3170

Callers

nothing calls this directly

Calls 5

append_columnMethod · 0.95
ColumnSetClass · 0.85
__init__Method · 0.45
popMethod · 0.45

Tested by

no test coverage detected