NDB offers a lightweight hooking mechanism. By defining a hook, an application can run some code before or after some type of operations; for example, a Model might run some function before every get(). A hook function runs when using the synchronous, asynchronous and multi versions of the appropriate method. For example, a "pre-get" hook would apply to all of get(), get_async(), and get_multi().
是的,你可以用钩子。在
https://developers.google.com/appengine/docs/python/ndb/entities#hooks
相关问题 更多 >
编程相关推荐