class CacheKey(NamedTuple): (source)
The key used to identify a SQL statement construct in the SQL compilation cache. .. seealso:: :ref:`sql_caching`
Method | __eq__ |
Undocumented |
Method | __hash__ |
CacheKey itself is not hashable - hash the .key portion |
Method | __str__ |
Undocumented |
Method | to |
Generate an "offline string" form of this :class:`.CacheKey` |
Class Variable | bindparams |
Undocumented |
Class Variable | key |
Undocumented |
Class Method | _diff |
Undocumented |
Method | _apply |
Undocumented |
Method | _diff |
Undocumented |
Method | _generate |
used for testing |
Method | _whats |
Undocumented |
MutableMapping[ Any, str]
, statement: ClauseElement
, parameters: _CoreSingleExecuteParams
) -> str
:
(source)
¶
Generate an "offline string" form of this :class:`.CacheKey` The "offline string" is basically the string SQL for the statement plus a repr of the bound parameter values in series. Whereas the :class:`.CacheKey` object is dependent on in-memory identities in order to work as a cache key, the "offline" version is suitable for a cache that will work for other processes as well. The given ``statement_cache`` is a dictionary-like object where the string form of the statement itself will be cached. This dictionary should be in a longer lived scope in order to reduce the time spent stringifying statements.
CacheKey
, target_element: ClauseElement
) -> ClauseElement
:
(source)
¶
Undocumented