Ë
    ðmxi}  ã            	      óÒ   — d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dlmZ ddlmZ ej                  rd	d
l
mZ  G d„ deeef   «      Z G d„ deeedf   eed   ef   f   «      Zy)é    )ÚannotationsN)ÚAny)ÚDict)ÚTuple)ÚUnioné   )ÚLiteralé   )Ú
CacheConstc                  ó   — e Zd ZdZdd„Zy)Úprefix_anon_mapaf  A map that creates new keys for missing key access.

    Considers keys of the form "<ident> <name>" to produce
    new symbols "<name>_<index>", where "index" is an incrementing integer
    corresponding to <name>.

    Inlines the approach taken by :class:`sqlalchemy.util.PopulateDict` which
    is otherwise usually used for this type of operation.

    c                ó|   — |j                  dd«      \  }}| j                  |d«      }|dz   | |<   |› d|› �}|| |<   |S )Nú r
   Ú_)ÚsplitÚget)ÚselfÚkeyÚidentÚderivedÚanonymous_counterÚvalues         úN/home/htdocs/ttos/venv/lib/python3.12/site-packages/sqlalchemy/sql/_py_util.pyÚ__missing__zprefix_anon_map.__missing__"   sV   € ØŸ9™9 S¨!Ó,Ñˆ�Ø ŸH™H W¨aÓ0ÐØ)¨AÑ-ˆˆW‰Ø�)˜1Ð.Ð/Ð0ˆØˆˆS‰	Øˆó    N)r   ÚstrÚreturnr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   © r   r   r   r      s   „ ñ	ôr   r   c                  ó$   — e Zd ZdZdZdd„Zdd„Zy)Úcache_anon_mapaU  A 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.

    r   c                ó¤   — t        |«      }|| v r| |   }|dusJ ‚|dfS t        | j                  «      x| |<   }| xj                  dz  c_        |dfS )NTr
   F)Úidr   Ú_index)r   Úobject_ÚidselfÚs_valÚid_s        r   Úget_anonzcache_anon_map.get_anon;   sd   € Ü�G“ˆØ�T‰>Ø˜‘LˆEØ Ñ$Ð$Ð$Ø˜$�;Ðô "% T§[¡[Ó!1Ð1ˆD�‰L˜3Ø�KŠK˜1Ñ�Kà˜�:Ðr   c                ód   — t        | j                  «      x| |<   }| xj                  dz  c_        |S )Nr
   )r   r'   )r   r   Úvals      r   r   zcache_anon_map.__missing__H   s,   € Ü˜dŸk™kÓ*Ð*ˆˆS‰	�CØ�Š�qÑ�Øˆ
r   N)r(   r   r   zTuple[str, bool])r   Úintr   r   )r   r   r    r!   r'   r,   r   r"   r   r   r$   r$   +   s   „ ñ	ð €Fóôr   r$   zLiteral[CacheConst.NO_CACHE]T)Ú
__future__r   Útypingr   r   r   r   Úutil.typingr	   ÚTYPE_CHECKINGÚ	cache_keyr   r   r   r/   r$   r"   r   r   ú<module>r5      sl   ðõ #ã Ý Ý Ý Ý å !à	×ÒÝ%ô�d˜3 ˜8‘nô ô* ØˆˆsÐ2Ð2Ñ	3°U¸7À4¹=È#Ð;MÑ5NÐ	NÑOõ r   