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

Method _clone

lib/sqlalchemy/sql/elements.py:5003–5014  ·  view source on GitHub ↗
(self, detect_subquery_cols=False, **kw)

Source from the content-addressed store, hash-verified

5001 return super().entity_namespace
5002
5003 def _clone(self, detect_subquery_cols=False, **kw):
5004 if (
5005 detect_subquery_cols
5006 and self.table is not None
5007 and self.table._is_subquery
5008 ):
5009 clone = kw.pop("clone")
5010 table = clone(self.table, **kw)
5011 new = table.c.corresponding_column(self)
5012 return new
5013
5014 return super()._clone(**kw)
5015
5016 @HasMemoized_ro_memoized_attribute
5017 def _from_objects(self) -> List[FromClause]:

Callers 4

_cloneMethod · 0.45
typed_expressionMethod · 0.45

Calls 3

cloneFunction · 0.70
popMethod · 0.45
corresponding_columnMethod · 0.45

Tested by

no test coverage detected