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

Method replace

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

Source from the content-addressed store, hash-verified

1383 # ColumnClause with parent table referring to those
1384 # replaced FromClause objects
1385 def replace(
1386 obj: Union[BinaryExpression[Any], ColumnClause[Any]],
1387 **kw: Any,
1388 ) -> Optional[KeyedColumnElement[Any]]:
1389 if isinstance(obj, ColumnClause) and obj.table in new_froms:
1390 newelem = new_froms[obj.table].corresponding_column(obj)
1391 return newelem
1392 return None
1393
1394 kw["replace"] = replace
1395

Callers 15

_setup_for_driverFunction · 0.45
_set_parentMethod · 0.45
_replaceMethod · 0.45
__getitem__Method · 0.45
_gen_tq_labelMethod · 0.45
safe_constructMethod · 0.45
__add__Method · 0.45
__radd__Method · 0.45
coercions.pyFile · 0.45
processMethod · 0.45
processMethod · 0.45

Calls 1

corresponding_columnMethod · 0.45

Tested by

no test coverage detected