generate a cache key for the given element, substituting its bind values for the translation values present.
(
self, anon_map: anon_map, bindparams: List[BindParameter[Any]]
)
| 4187 | } |
| 4188 | |
| 4189 | def _gen_cache_key( |
| 4190 | self, anon_map: anon_map, bindparams: List[BindParameter[Any]] |
| 4191 | ) -> Optional[typing_Tuple[Any, ...]]: |
| 4192 | """generate a cache key for the given element, substituting its bind |
| 4193 | values for the translation values present.""" |
| 4194 | |
| 4195 | existing_bps: List[BindParameter[Any]] = [] |
| 4196 | ck = self.element._gen_cache_key(anon_map, existing_bps) |
| 4197 | |
| 4198 | bindparams.extend( |
| 4199 | ( |
| 4200 | bp._with_value( |
| 4201 | self.translate[bp.key], maintain_key=True, required=False |
| 4202 | ) |
| 4203 | if bp.key in self.translate |
| 4204 | else bp |
| 4205 | ) |
| 4206 | for bp in existing_bps |
| 4207 | ) |
| 4208 | |
| 4209 | return ck |
| 4210 | |
| 4211 | |
| 4212 | class _OverRange(Enum): |
nothing calls this directly
no test coverage detected