MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / SetShardOption

Class SetShardOption

test/orm/test_events.py:185–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 User, Address, Dinagling = self.classes("User", "Address", "Dingaling")
184
185 class SetShardOption(UserDefinedOption):
186 propagate_to_loaders = True
187
188 def _gen_cache_key(self, anon_map, bindparams):
189 if key_type == "fixed":
190 return (None,)
191 elif key_type == "payload":
192 return (self.payload,)
193 elif key_type == "dont_cache":
194 anon_map[NO_CACHE] = True
195 return None
196 else:
197 assert False
198
199 if use_query_cache:
200 testing.db._compiled_cache.clear()

Callers 1

Calls

no outgoing calls

Tested by 1