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

Class Bakery

lib/sqlalchemy/ext/baked.py:34–53  ·  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. .. versionadded:: 1.2

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 .. versionadded:: 1.2
42
43
44 """
45
46 __slots__ = "cls", "cache"
47
48 def __init__(self, cls_, cache):
49 self.cls = cls_
50 self.cache = cache
51
52 def __call__(self, initial_fn, *args):
53 return self.cls(self.cache, initial_fn, args)
54
55
56class BakedQuery:

Callers 1

bakeryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected