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

Method replace

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

Source from the content-addressed store, hash-verified

5890 # 3. clone everything else, making sure we use columns
5891 # corresponding to the froms we just made.
5892 def replace(
5893 obj: Union[BinaryExpression[Any], ColumnClause[Any]],
5894 **kw: Any,
5895 ) -> Optional[KeyedColumnElement[Any]]:
5896 if isinstance(obj, ColumnClause) and obj.table in new_froms:
5897 newelem = new_froms[obj.table].corresponding_column(obj)
5898 return newelem
5899 return None
5900
5901 kw["replace"] = replace
5902

Callers

nothing calls this directly

Calls 1

corresponding_columnMethod · 0.45

Tested by

no test coverage detected