MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / Bakery

Class Bakery

lib/sqlalchemy/ext/baked.py:34–50  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

32
33
34class 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
53class BakedQuery:

Callers 1

bakeryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected