L i} ddlmZddlZddlmZddlmZddlmZddlmZddlmZejrd d l m Z Gd d ee e fZ Gd deeedfeede ffZy)) annotationsN)Any)Dict)Tuple)Union)Literal) CacheConstceZdZdZddZy)prefix_anon_mapafA map that creates new keys for missing key access. Considers keys of the form " " to produce new symbols "_", where "index" is an incrementing integer corresponding to . Inlines the approach taken by :class:`sqlalchemy.util.PopulateDict` which is otherwise usually used for this type of operation. c||jdd\}}|j|d}|dz||<|d|}|||<|S)N r _)splitget)selfkeyidentderivedanonymous_countervalues ]/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sqlalchemy/sql/_py_util.py __missing__zprefix_anon_map.__missing__"sV99S!, HHWa0)A-W )1./0S  N)rstrreturnr)__name__ __module__ __qualname____doc__rrrr r s  rr c$eZdZdZdZddZddZy)cache_anon_mapaUA map that creates new keys for missing key access. Produces an incrementing sequence given a series of unique keys. This is similar to the compiler prefix_anon_map class although simpler. Inlines the approach taken by :class:`sqlalchemy.util.PopulateDict` which is otherwise usually used for this type of operation. rct|}||vr||}|dusJ|dfSt|jx||<}|xjdz c_|dfS)NTr F)idr_index)robject_idselfs_valid_s rget_anonzcache_anon_map.get_anon;sdG T>LE$ $$$; "%T[[!1 1DL3 KK1 K: rcdt|jx||<}|xjdz c_|S)Nr )rr')rrvals rrzcache_anon_map.__missing__Hs,dkk**S C q  rN)r(rrzTuple[str, bool])rintrr)rrr r!r'r,rr"rrr$r$+s F rr$zLiteral[CacheConst.NO_CACHE]T) __future__rtypingrrrr util.typingr TYPE_CHECKING cache_keyr rr r/r$r"rrr5sl# ! %d38n* s22 3U74=#;M5N NO r