(self, maintain_key: bool = False, **kw: Any)
| 2225 | return c |
| 2226 | |
| 2227 | def _clone(self, maintain_key: bool = False, **kw: Any) -> Self: |
| 2228 | c: Self = ClauseElement._clone(self, **kw) |
| 2229 | # ensure all the BindParameter objects stay in cloned set. |
| 2230 | # in #7823, we changed "clone" so that a clone only keeps a reference |
| 2231 | # to the "original" element, since for column correspondence, that's |
| 2232 | # all we need. However, for BindParam, _cloned_set is used by |
| 2233 | # the "cache key bind match" lookup, which means if any of those |
| 2234 | # interim BindParameter objects became part of a cache key in the |
| 2235 | # cache, we need it. So here, make sure all clones keep carrying |
| 2236 | # forward. |
| 2237 | c._cloned_set.update(self._cloned_set) |
| 2238 | if not maintain_key and self.unique: |
| 2239 | c.key, c._anon_map_key = _anonymous_label.safe_construct_with_key( |
| 2240 | id(c), c._orig_key or "param", sanitize_key=True |
| 2241 | ) |
| 2242 | return c |
| 2243 | |
| 2244 | def _gen_cache_key(self, anon_map, bindparams): |
| 2245 | _gen_cache_ok = self.__class__.__dict__.get("inherit_cache", False) |
no test coverage detected