I\'m trying to write a simple utility function that wraps a given closure and exposes some database-related objects. It looks like this: