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

Method memo

lib/sqlalchemy/orm/unitofwork.py:230–235  ·  view source on GitHub ↗
(self, key, callable_)

Source from the content-addressed store, hash-verified

228 return state in self.states and self.states[state][0]
229
230 def memo(self, key, callable_):
231 if key in self.attributes:
232 return self.attributes[key]
233 else:
234 self.attributes[key] = ret = callable_()
235 return ret
236
237 def remove_state_actions(self, state):
238 """Remove pending actions for a state from the uowtransaction."""

Callers 4

presort_savesMethod · 0.45
process_deletesMethod · 0.45
_key_switchersMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected