MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _effective_key

Method _effective_key

lib/sqlalchemy/ext/baked.py:160–171  ·  view source on GitHub ↗

Return the key that actually goes into the cache dictionary for this :class:`.BakedQuery`, taking into account the given :class:`.Session`. This basically means we also will include the session's query_class, as the actual :class:`_query.Query` object is part of what

(self, session)

Source from the content-addressed store, hash-verified

158 return self
159
160 def _effective_key(self, session):
161 """Return the key that actually goes into the cache dictionary for
162 this :class:`.BakedQuery`, taking into account the given
163 :class:`.Session`.
164
165 This basically means we also will include the session's query_class,
166 as the actual :class:`_query.Query` object is part of what's cached
167 and needs to match the type of :class:`_query.Query` that a later
168 session will want to use.
169
170 """
171 return self._cache_key + (session._query_cls,)
172
173 def _with_lazyload_options(self, options, effective_path, cache_path=None):
174 """Cloning version of _add_lazyload_options."""

Callers 3

_retrieve_baked_queryMethod · 0.95
_bakeMethod · 0.95
_iterMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected