Callable which returns a :class:`.BakedQuery`. This object is returned by the class method :meth:`.BakedQuery.bakery`. It exists as an object so that the "cache" can be easily inspected.
| 32 | |
| 33 | |
| 34 | class Bakery: |
| 35 | """Callable which returns a :class:`.BakedQuery`. |
| 36 | |
| 37 | This object is returned by the class method |
| 38 | :meth:`.BakedQuery.bakery`. It exists as an object |
| 39 | so that the "cache" can be easily inspected. |
| 40 | |
| 41 | """ |
| 42 | |
| 43 | __slots__ = "cls", "cache" |
| 44 | |
| 45 | def __init__(self, cls_, cache): |
| 46 | self.cls = cls_ |
| 47 | self.cache = cache |
| 48 | |
| 49 | def __call__(self, initial_fn, *args): |
| 50 | return self.cls(self.cache, initial_fn, args) |
| 51 | |
| 52 | |
| 53 | class BakedQuery: |