MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / replace

Method replace

lib/sqlalchemy/sql/selectable.py:6147–6154  ·  view source on GitHub ↗
(
            obj: Union[BinaryExpression[Any], ColumnClause[Any]],
            **kw: Any,
        )

Source from the content-addressed store, hash-verified

6145 # 3. clone everything else, making sure we use columns
6146 # corresponding to the froms we just made.
6147 def replace(
6148 obj: Union[BinaryExpression[Any], ColumnClause[Any]],
6149 **kw: Any,
6150 ) -> Optional[KeyedColumnElement[Any]]:
6151 if isinstance(obj, ColumnClause) and obj.table in new_froms:
6152 newelem = new_froms[obj.table].corresponding_column(obj)
6153 return newelem
6154 return None
6155
6156 kw["replace"] = replace
6157

Callers

nothing calls this directly

Calls 1

corresponding_columnMethod · 0.45

Tested by

no test coverage detected