MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _apply_params_to_element

Method _apply_params_to_element

lib/sqlalchemy/sql/cache_key.py:555–564  ·  view source on GitHub ↗
(
        self, original_cache_key: CacheKey, target_element: ColumnElement[Any]
    )

Source from the content-addressed store, hash-verified

553
554 @util.preload_module("sqlalchemy.sql.elements")
555 def _apply_params_to_element(
556 self, original_cache_key: CacheKey, target_element: ColumnElement[Any]
557 ) -> ColumnElement[Any]:
558 if target_element._is_immutable or original_cache_key is self:
559 return target_element
560
561 elements = util.preloaded.sql_elements
562 return elements._OverrideBinds(
563 target_element, self.bindparams, original_cache_key.bindparams
564 )
565
566
567def _ad_hoc_cache_key_from_args(

Callers 2

processMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected