ó
    Ñ]j�4 ã                  óT	  • % S r SSKJr  SSKrSSKJr  SSKrSSKJr  SSKrSSK	r	SSK
Jr  SSK
Jr  SSK
Jr  SS	K
Jr  SS
K
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSK
J r   SSK
J!r!  SSK"J#r#  SSK"J$r$  SS K%J&r&  SS!K%J'r'  SS"K(J)r)  SS#K$J*r*  SS$K$J+r+  SS%K$J,r,  SS&K$J-r-  S'S(K"J.r.  S'S)K"J/r/  S'S*K"J0r0  S'S+K0J1r1  S'S,K0J2r2  S'S-K0J
r3  S'S.K0J4r4  S'S/K5J6r6  S'S0K5J7r7  S'S1K5J8r8  S'S2K5J9r9  \(       aÌ  SS3K"J:r:  SS4K"J;r;  SS5K"J<r<  SS6K=J>r>  SS7K=J?r?  SS8K@JArA  SS9K%JBrB  SS:KCJDrD  SS;K;JErE  SS<K;JFrF  SS=K;JGrG  SS>K;JHrH  SS?K;JIrI  SS@K;JJrJ  SSAK;JKrK  SSBKLJMrM  SSCKLJNrN  SSDKOJPrP  SSEKOJQrQ  SSFKOJRrR  SSGK$JSrS  S'SHKTJUrU  S'SIKTJVrV  S'SJKWJXrX  S'SKKWJYrY  S'SLKWJZrZ  S'SMKWJ[r[  S'SNKWJ\r\  S'SOKWJ]r]  S'SPKWJ^r^  S'SQKWJ_r_  S'SRKWJ`r`  S'SSKWJara  S'STK.Jbrb  \(       d  Sr:Sr;Sr< " SU SV\5      rc\cRÈ                  rdSW\eSX'    " SY SZ\5      rf\fRÎ                  rhSW\eS['   \ " S\\S]9ri\ " S^\S_\4   S]9rj\\k\k4   rl " S` Sa\5      rm\RÜ                  " Sb5      roSc\eSd'    " Se Sf\75      rp " Sg Sh\75      rqSµSi jrr\ " Sj\S]9rs " Sk Sl5      rt " Sm Sn\t5      ru    S¶So jrv    S·Sp jrw\ " SqSrS]9rx " Ss Sr\3Rn                  5      ryS¸St jrzS¹Su jr{Sv r|    SºSw jr}    SºSx jr~S»Sy jrS»Sz jr€ " S{ S|\\k\4   5      r� " S} S~\\k\4   5      r‚\0GR                  " S5      S¼S€ j5       r„ " S� S‚5      r… " Sƒ S„5      r† " S… S†\15      r‡ " S‡ Sˆ\15      rˆ " S‰ SŠ\‡5      r‰ " S‹ SŒ\Š5      r‹ " S� SŽ\‹S�9rŒ " S� S‘\Œ\&5      r� " S’ S“\)5      rŽ " S” S•\#GR                  5      r� " S– S—\.GR"                  5      r’ " S˜ S™\’\$GR&                  5      r” " Sš S›\*5      r• " Sœ S�\5      r– " Sž SŸ\5      r—\ " S \!S\k4   \k5      r˜\ " S¡S¢S£S¤9r™\ " S¥S¢S]9rš " S¦ S§\\™   5      r› " S¨ S©\\˜\™4   5      rœ\ " SªS«S]9r� " S¬ S­\œ\k\�4   5      rž " S® S¯\0GR>                  \œ\˜\™4   5      r  " S° S±\0GRB                  S²   5      r¢    S½S³ jr£\d4       S¾S´ jjr¤g)¿z2Foundational utilities common to many sql modules.é    )ÚannotationsN)ÚEnum©Úzip_longest)ÚAny)ÚCallable)Úcast)ÚDict)Ú	FrozenSet)Ú	Generator)ÚGeneric)ÚIterable)ÚIterator)ÚList)ÚMapping)ÚMutableMapping)Ú
NamedTuple)ÚNoReturn)ÚOptional)Úoverload)ÚSequence)ÚSet)ÚTuple)ÚType)ÚTYPE_CHECKING)ÚTypeVar)ÚUnioné   )Úroles)Úvisitors)ÚHasCacheKey)ÚMemoizedHasCacheKey)ÚHasCopyInternals)ÚClauseVisitor)ÚExtendedInternalTraversal)ÚExternallyTraversible)ÚInternalTraversalé   )Úevent)Úexc)Úutil)ÚHasMemoized)Úhybridmethod)Útyping)Úwarn_deprecated)ÚFinal)ÚProtocol)ÚSelf)Ú	TypeGuard)Ú	coercions)Úelements)Útype_api)ÚDMLStrategyArgument)ÚSynchronizeSessionArgument)Ú_CLE)ÚCacheKey)ÚSQLCompiler)ÚBindParameter)Ú
ClauseList)ÚColumnClause)ÚColumnElement)ÚNamedColumn)ÚSQLCoreOperations)Ú
TextClause)ÚColumn)ÚDefaultGenerator)Ú_JoinTargetElement)Ú_SelectIterable)Ú
FromClause)Úanon_map)Ú
Connection)ÚCursorResult)Ú_CoreMultiExecuteParams)Ú_ExecuteOptions)Ú_ImmutableExecuteOptions)Ú
CacheStats)ÚCompiled)ÚCompiledCacheType)ÚCoreExecuteOptionsParameter)ÚDialect)ÚIsolationLevel)ÚSchemaTranslateMapType)Ú
dispatcherc                  ó   • \ rS rSrSrS rSrg)Ú_NoArgék   r   c                ó    • SU R                    3$ )Nz_NoArg.)Úname©Úselfs    ÚP/home/mande/repo/quber/.venv/lib/python3.13/site-packages/sqlalchemy/sql/base.pyÚ__repr__Ú_NoArg.__repr__n   s   € Ø˜Ÿ™˜Ð$Ð$ó    © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ÚNO_ARGr^   Ú__static_attributes__ra   r`   r]   rW   rW   k   s   † Ø€Fõ%r`   rW   r0   rf   c                  ó   • \ rS rSrSrSrg)Ú	_NoneNameéu   r   ra   N)rb   rc   rd   re   Ú	NONE_NAMErg   ra   r`   r]   ri   ri   u   s
   † Ø€IÚHr`   ri   Ú
_NONE_NAMEÚ_T)ÚboundÚ_Fn.c                  óZ   • \ rS rSr% S\S'   S\S'   S\S'   S\S'   \    SS j5       rS	rg
)Ú_DefaultDescriptionTupleéƒ   r   ÚargzOptional[bool]Ú	is_scalarÚis_callableÚis_sentinelc                óþ   • U(       ai  UR                   (       d"  UR                  (       dG  UR                  (       a6  [        UR                  UR
                  UR                  UR                  5      $ [        S S S S 5      $ ©N)Úhas_argÚ
for_updaterv   rq   rs   rt   ru   )ÚclsÚdefaults     r]   Ú_from_column_defaultÚ-_DefaultDescriptionTuple._from_column_default‰   se   € ö à——Ø×*×*¨w×/B×/Bô %Ø—‘Ø×!Ñ!Ø×#Ñ#Ø×#Ñ#ó	ð	
ô *¨$°°d¸DÓAð	
r`   ra   N)r|   zOptional[DefaultGenerator]Úreturnrq   )rb   rc   rd   re   Ú__annotations__Úclassmethodr}   rg   ra   r`   r]   rq   rq   ƒ   s;   ‡ Ø	ƒHØÓØÓØÓàð
Ø0ð
à	!ó
ó ó
r`   rq   Ú_omit_from_statementszoperator.attrgetter[Any]Ú_never_select_columnc                  ó   • \ rS rSrSS jrSrg)Ú_EntityNamespaceé¢   c                ó   • g rx   ra   ©r\   Úkeys     r]   Ú__getattr__Ú_EntityNamespace.__getattr__£   s   € ¸sr`   ra   N)r‰   Ústrr   úSQLCoreOperations[Any])rb   rc   rd   re   rŠ   rg   ra   r`   r]   r…   r…   ¢   s   † ßBr`   r…   c                  ó<   • \ rS rSr\R
                  SS j5       rSrg)Ú_HasEntityNamespaceé¦   c                ó   • g rx   ra   r[   s    r]   Úentity_namespaceÚ$_HasEntityNamespace.entity_namespace§   s   € Ø47r`   ra   N)r   r…   )rb   rc   rd   re   r+   Úro_non_memoized_propertyr’   rg   ra   r`   r]   r�   r�   ¦   s   † Ø	×"Ñ"Û7ó #Û7r`   r�   c                ó   • [        U S5      $ )Nr’   )Úhasattr)Úelements    r]   Ú_is_has_entity_namespacer˜   «   s   € Ü�7Ð.Ó/Ð/r`   Ú_Selfc                  óf   • \ rS rSr% SrSrSrS\S'   SS jrSS jr	SS	 jr
SS
.     SS jjrSrg)Ú	Immutableé³   a  mark a ClauseElement as 'immutable' when expressions are cloned.

"immutable" objects refers to the "mutability" of an object in the
context of SQL DQL and DML generation.   Such as, in DQL, one can
compose a SELECT or subquery of varied forms, but one cannot modify
the structure of a specific table or column within DQL.
:class:`.Immutable` is mostly intended to follow this concept, and as
such the primary "immutable" objects are :class:`.ColumnClause`,
:class:`.Column`, :class:`.TableClause`, :class:`.Table`.

ra   TÚboolÚ_is_immutablec                ó   • [        S5      e©Nz(Immutable objects do not support copying©ÚNotImplementedError©r\   ÚoptionaldictÚkwargss      r]   Úunique_paramsÚImmutable.unique_paramsÄ   ó   € Ü!Ð"LÓMÐMr`   c                ó   • [        S5      er    r¡   r£   s      r]   ÚparamsÚImmutable.paramsÇ   r¨   r`   c                ó   • U $ rx   ra   ©r\   Úkws     r]   Ú_cloneÚImmutable._cloneÊ   s   € Øˆr`   )Ú
omit_attrsc               ó   • g rx   ra   )r\   r±   r®   s      r]   Ú_copy_internalsÚImmutable._copy_internalsÍ   s   € ð 	r`   N)r¤   r   r¥   r   r   r   )r\   r™   r®   r   r   r™   )r±   zIterable[str]r®   r   r   ÚNone)rb   rc   rd   re   Ú__doc__Ú	__slots__rž   r€   r¦   rª   r¯   r³   rg   ra   r`   r]   r›   r›   ³   sP   ‡ ñ
ð €Ià€M�4ÓôNôNôð .0ñØ*ðØ7:ðà	÷ð r`   r›   c                  óx   • \ rS rSr% SrSrS\S'   S \S'   SS jr\R                  SS j5       r
\SS	 j5       rS
rg)ÚSingletonConstantéÓ   z.Represent SQL constants like NULL, TRUE, FALSETr�   Ú_is_singleton_constantÚ
_singletonc                ó6   • [        [        U R                  5      $ rx   )r	   rm   r¼   )r{   rs   r®   s      r]   Ú__new__ÚSingletonConstant.__new__Ú   s   € Ü”B˜Ÿ™Ó'Ð'r`   c                ó   • [        5       erx   r¡   r[   s    r]   Ú	proxy_setÚSingletonConstant.proxy_setÝ   ó   € ä!Ó#Ð#r`   c                ó|   • [         R                  U 5      nUR                  5         [        U/5      Ul        Xl        g rx   )Úobjectr¾   Ú__init__Ú	frozensetrÁ   r¼   )r{   Úobjs     r]   Ú_create_singletonÚ#SingletonConstant._create_singletoná   s.   € ä�n‰n˜SÓ!ˆØ�‰Œô " 3 %Ó(ˆŒØ�r`   ra   N)r{   rm   rs   r   r®   r   r   rm   ©r   zFrozenSet[ColumnElement[Any]]©r   rµ   )rb   rc   rd   re   r¶   r»   r€   r¾   r+   Únon_memoized_propertyrÁ   r�   rÉ   rg   ra   r`   r]   r¹   r¹   Ó   sI   ‡ Ù8à#'Ð˜DÓ'à!Ó!ô(ð 
×Ñó$ó  ð$ð óó ór`   r¹   c                 ó~   • [         R                  R                  U  Vs/ s H  oR                  PM     sn5      $ s  snf rx   )Ú	itertoolsÚchainÚfrom_iterableÚ_from_objects)r5   r—   s     r]   rÒ   rÒ   ñ   s4   € ô
 �?‰?×(Ñ(Ù.6Ó7ªh 7×	Ô	©hÑ7óð ùÚ7ó   ž:c                ó~   • [         R                  R                  U  Vs/ s H  oR                  PM     sn5      $ s  snf )zPexpand tables into individual columns in the
given list of column expressions.

)rÏ   rÐ   rÑ   Ú_select_iterable)r5   Úcs     r]   Ú_select_iterablesr×   û   s4   € ô �?‰?×(Ñ(Ù%-Ó.¢X ×	Ô	¡XÑ.óð ùÚ.rÓ   Ú_SelfGenerativeTypeÚ_GenerativeTypec                  ó   • \ rS rSrSS jrSrg)rÙ   i
  c                ó   • g rx   ra   r[   s    r]   Ú	_generateÚ_GenerativeType._generate  s   €  r`   ra   N©r   r2   )rb   rc   rd   re   rÜ   rg   ra   r`   r]   rÙ   rÙ   
  s   † ß$r`   c                óf   • [         R                            SS j5       nU" U 5      nXl        U$ )zˆnon-caching _generative() decorator.

This is basically the legacy decorator that copies the object and
runs a method on the new copy.

c                óT   • UR                  5       nU " U/UQ70 UD6nXAL d   S5       eU$ )zMark a method as generative.z#generative methods must return self)rÜ   )Úfnr\   Úargsr®   Úxs        r]   Ú_generativeÚ _generative.<locals>._generative  s9   € ð �~‰~ÓˆÙˆtÐ!�dÒ!˜bÑ!ˆØŠyÐ?Ð?Ó?ˆyØˆr`   )
rá   ro   r\   rØ   râ   r   r®   r   r   rØ   )r+   Ú	decoratorÚnon_generative)rá   rä   Ú	decorateds      r]   rä   rä     sY   € ô 
‡^�^ðØðØ*ðØ36ðØ>Aðà	óó ðñ ˜B“€IØ!ÔØÐr`   c            	     ó  ^^• UR                  S0 5      mUR                  S0 5      nU  Vs/ s H,  nU[        R                  " U5      UR                  US 5      4PM.     snm[        R
                  SUU4S jj5       nU$ s  snf )NÚmsgsÚdefaultsc           	     óè   >• US   nUSS  nT HV  u  pEnU" U5      ULd  M  T	R                  USU R                  < SUR                  < S35      n[        R                  " U5      e   U " U/UQ70 UD6$ )Nr   r   zMethod z$() has already been invoked on this z
 construct)Úgetrb   Ú	__class__r*   ÚInvalidRequestError)
rá   râ   r®   r\   rZ   ÚgetterÚdefault_ÚmsgÚgettersrê   s
           €€r]   ÚcheckÚ!_exclusive_against.<locals>.check0  s�   ø€ ð �A‰wˆØ�A�BˆxˆÛ&-Ñ"ˆD˜(Ù�d‹| 8Ô+Ø—h‘hÙà—{”{ D§N¤Nð4ó�ô
 ×-Ò-¨cÓ2Ð2ñ '.ñ �$Ð$˜Ò$ Ñ$Ð$r`   )rá   ro   râ   r   r®   r   r   r   )ÚpopÚoperatorÚ
attrgetterrí   r+   ræ   )Únamesr®   rë   rZ   rô   ró   rê   s        @@r]   Ú_exclusive_againstrú   &  s†   ù€ ØŸ6™6 &¨"Ó-€Dà!Ÿv™v j°"Ó5€Hñ óJâˆDð 
Œx×"Ò" 4Ó(¨(¯,©,°t¸TÓ*BÓCÙñJ€Gô
 
‡^�^÷%ó ð%ð €Lùò+Js   «3A?c                ó&   • U R                   " S0 UD6$ ©Nra   )r¯   )r—   r®   s     r]   r¯   r¯   C  s   € Ø�>Š>Ñ˜BÑÐr`   c                óf   • [         R                  " U  Vs/ s H  oR                  PM     sn6 $ s  snf )zTexpand the given set of ClauseElements to be the set of all 'cloned'
predecessors.

)rÏ   rÐ   Ú_cloned_set©r5   rã   s     r]   Ú_expand_clonedr   G  s'   € ô �?Š?±HÓ=²H¨qŸ]œ]±HÑ=Ð>Ð>ùÒ=s   •.c              #  óv   #   • U  H/  nUR                   b  UR                   nUR                   b  M  Uv •  M1     g 7frx   )Ú_is_clone_ofrÿ   s     r]   Ú	_de_cloner  R  s5   é € ó ˆØ�n‰nÑ(Ø—‘ˆAð �n‰nÓ(àŒò ùs   ‚,9°	9c                óÌ   • [        [        U 5      5      R                  [        U5      5      nU  Vs1 s H&  o2R                  UR                  5      (       d  M$  UiM(     sn$ s  snf )z return the intersection of sets a and b, counting
any overlap between 'cloned' predecessors.

The returned set is in terms of the entities present within 'a'.

©Úsetr   Úintersectionrþ   ©ÚaÚbÚall_overlapÚelems       r]   Ú_cloned_intersectionr  [  sQ   € ô !¤°Ó!2Ó3×@Ñ@Ü�qÓó€Kñ ÓMšQ�T×":Ñ":¸4×;KÑ;K×"L�D™QÑMÐMùÒMó   ±#A!ÁA!c                óÌ   • [        [        U 5      5      R                  [        U5      5      nU  Vs1 s H&  o2R                  UR                  5      (       a  M$  UiM(     sn$ s  snf rx   r  r  s       r]   Ú_cloned_differencer  h  sX   € Ü ¤°Ó!2Ó3×@Ñ@Ü�qÓó€Kñ óÚ�×":Ñ":¸4×;KÑ;K×"L�™ñð ùò r  c                  ób   • \ rS rSrSrSrSS jrSS jrSS jrSS jr	SS jr
SS	 jrSS
 jrSrg)Ú_DialectArgViewiq  zYA dictionary view of dialect-level arguments in the form
<dialectname>_<argument_name>.

©rÈ   c                ó   • Xl         g rx   r  )r\   rÈ   s     r]   rÆ   Ú_DialectArgView.__init__y  s   € Ø�r`   c                ón   •  UR                  SS5      u  p#X#4$ ! [         a  n[        U5      UeS nAff = f)NÚ_r   )ÚsplitÚ
ValueErrorÚKeyError)r\   r‰   ÚdialectÚ	value_keyÚerrs        r]   Ú_keyÚ_DialectArgView._key|  sC   € ð	&Ø!$§¡¨3°Ó!2ÑˆGð Ð%Ð%øô ó 	)Ü˜3“- SÐ(ûð	)ús   ‚ ™
4£/¯4c                ó´   • U R                  U5      u  p# U R                  R                  U   nXC   $ ! [        R                   a  n[        U5      UeS nAff = frx   )r  rÈ   Údialect_optionsr*   ÚNoSuchModuleErrorr  )r\   r‰   r  r  Úoptr  s         r]   Ú__getitem__Ú_DialectArgView.__getitem__„  sY   € Ø!ŸY™Y s›^Ñˆð	"Ø—(‘(×*Ñ*¨7Ñ3ˆCð ‘>Ð!øô ×$Ñ$ó 	)Ü˜3“- SÐ(ûð	)ús   •2 ²AÁAÁAc                ó´   •  U R                  U5      u  p4X R                  R                  U   U'   g ! [         a  n[        R
                  " S5      UeS nAff = f)Nz0Keys must be of the form <dialectname>_<argname>)r  rÈ   r!  r  r*   ÚArgumentError)r\   r‰   Úvaluer  r  r  s         r]   Ú__setitem__Ú_DialectArgView.__setitem__Ž  s]   € ð	AØ!%§¡¨3£ÑˆGð <A�H‰H×$Ñ$ WÑ-¨iÒ8øô ó 	Ü×#Ò#ØBóàðûð	ús   ‚1 ±
A»AÁAc                ó^   • U R                  U5      u  p#U R                  R                  U   U	 g rx   )r  rÈ   r!  )r\   r‰   r  r  s       r]   Ú__delitem__Ú_DialectArgView.__delitem__˜  s)   € Ø!ŸY™Y s›^ÑˆØ�H‰H×$Ñ$ WÑ-¨iÑ8r`   c                ój   • [        S U R                  R                  R                  5        5       5      $ )Nc              3  óL   #   • U  H  n[        UR                  5      v •  M     g 7frx   )ÚlenÚ_non_defaults)Ú.0râ   s     r]   Ú	<genexpr>Ú*_DialectArgView.__len__.<locals>.<genexpr>�  s%   é € ð 
â9�ô �×"Ñ"×#Ð#Ú9ùs   ‚"$)ÚsumrÈ   r!  Úvaluesr[   s    r]   Ú__len__Ú_DialectArgView.__len__œ  s/   € Üñ 
àŸ™×0Ñ0×7Ñ7Ô9ó
ó 
ð 	
r`   c                óD   ^ • U 4S jT R                   R                   5       $ )Nc              3  óŒ   >#   • U  H9  nTR                   R                  U   R                    H  nU< S U< 3v •  M     M;     g7f)r  N)rÈ   r!  r1  )r2  Údialect_nameÚ
value_namer\   s      €r]   r3  Ú+_DialectArgView.__iter__.<locals>.<genexpr>£  sH   øé € ð 
â 8�Ø"Ÿh™h×6Ñ6Øñç‰mó�
ó $¢ZÕ0ññ 1Ú 8ùs   ƒAA)rÈ   r!  r[   s   `r]   Ú__iter__Ú_DialectArgView.__iter__¢  s   ø€ ô
à $§¡× 8Ò 8ó
ð 	
r`   N)rÈ   ÚDialectKWArgsr   rµ   )r‰   rŒ   r   zTuple[str, str]©r‰   rŒ   r   r   ©r‰   rŒ   r(  r   r   rµ   ©r‰   rŒ   r   rµ   ©r   Úint)r   zGenerator[str, None, None])rb   rc   rd   re   r¶   r·   rÆ   r  r$  r)  r,  r7  r>  rg   ra   r`   r]   r  r  q  s2   † ñð
 €Iôô&ô"ôAô9ô
÷
r`   r  c                  óT   • \ rS rSrSrSS jrSS jrSS jrSS jrSS jr	SS jr
S	rg
)Ú_DialectArgDicti¬  z¬A dictionary view of dialect-level arguments for a specific
dialect.

Maintains a separate collection of user-specified arguments
and dialect-specified default arguments.

c                ó    • 0 U l         0 U l        g rx   ©r1  Ú	_defaultsr[   s    r]   rÆ   Ú_DialectArgDict.__init__µ  s   € Ø-/ˆÔØ)+ˆ�r`   c                óp   • [        [        U R                  5      R                  U R                  5      5      $ rx   )r0  r  r1  ÚunionrJ  r[   s    r]   r7  Ú_DialectArgDict.__len__¹  s'   € Ü”3�t×)Ñ)Ó*×0Ñ0°·±Ó@ÓAÐAr`   c                óp   • [        [        U R                  5      R                  U R                  5      5      $ rx   )Úiterr  r1  rM  rJ  r[   s    r]   r>  Ú_DialectArgDict.__iter__¼  s'   € Ü”C˜×*Ñ*Ó+×1Ñ1°$·.±.ÓAÓBÐBr`   c                ó\   • XR                   ;   a  U R                   U   $ U R                  U   $ rx   rI  rˆ   s     r]   r$  Ú_DialectArgDict.__getitem__¿  s.   € Ø×$Ñ$Ó$Ø×%Ñ% cÑ*Ð*à—>‘> #Ñ&Ð&r`   c                ó    • X R                   U'   g rx   ©r1  ©r\   r‰   r(  s      r]   r)  Ú_DialectArgDict.__setitem__Å  s   € Ø"'×Ñ˜3Òr`   c                ó   • U R                   U	 g rx   rU  rˆ   s     r]   r,  Ú_DialectArgDict.__delitem__È  s   € Ø×Ñ˜sÑ#r`   )rJ  r1  NrÌ   rD  )r   zIterator[str]rA  rB  rC  )rb   rc   rd   re   r¶   rÆ   r7  r>  r$  r)  r,  rg   ra   r`   r]   rG  rG  ¬  s'   † ñô,ôBôCô'ô(÷$r`   rG  zsqlalchemy.dialectsc                ó®   • [         R                  R                  R                  R	                  U 5      nUR
                  c  g [        UR
                  5      $ rx   )r+   Ú	preloadedÚdialectsÚregistryÚloadÚconstruct_argumentsÚdict)r;  Údialect_clss     r]   Ú_kw_reg_for_dialectrb  Ì  sB   € ä—.‘.×)Ñ)×2Ñ2×7Ñ7¸ÓE€KØ×&Ñ&Ñ.ØÜ�×/Ñ/Ó0Ð0r`   c                  ó,  • \ rS rSr% SrSrS\R                  4/rS\	S'   SSS.         SS	 jjr
\        SS
 j5       r\SS j5       r\SS j5       r\R"                  " \5      rS\	S'   \SS j5       r\R*                  SS j5       rSS jrSrg)r@  iÔ  a!  Establish the ability for a class to have dialect-specific arguments
with defaults and constructor validation.

The :class:`.DialectKWArgs` interacts with the
:attr:`.DefaultDialect.construct_arguments` present on a dialect.

.. seealso::

    :attr:`.DefaultDialect.construct_arguments`

ra   r!  zList[Tuple[str, Any]]Ú"_dialect_kwargs_traverse_internalsN)Úelse_Údeprecated_fallbackc               ó²  • [         R                  UR                     nUc  U$ X%R                  U R                  0 5      ;   Ga  Ub  UR                  U:X  a  U R
                  UR                     U   $ UR                  U R
                  ;   aC  UU R
                  UR                     R                  ;   a  U R
                  UR                     U   $ X@R
                  ;   a]  UU R
                  U   R                  ;   a@  [        SU SU SUR                   SUR                   SU S3SS9  U R
                  U   U   $ U R
                  UR                     U   $ U$ )aÍ  Return the value of a dialect-specific option, or *else_* if
this dialect does not register the given argument.

This is useful for DDL compilers that may be inherited by
third-party dialects whose ``construct_arguments`` do not
include the same set of keys as the parent dialect.

:param dialect: The dialect for which to retrieve the option.
:param argument_name: The name of the argument to retrieve.
:param else\_: The value to return if the argument is not present.
:param deprecated_fallback: Optional dialect name to fall back to
 if the argument is not present for the current dialect. If the
 argument is present for the fallback dialect but not the current
 dialect, a deprecation warning will be emitted.

zUsing 'r  z' with the 'z6' dialect is deprecated; please additionally specify 'z'.z2.1)Úversion)r@  Ú_kw_registryrZ   rí   rî   r!  r1  r/   )r\   r  Úargument_namere  rf  r]  s         r]   Úget_dialect_optionÚ DialectKWArgs.get_dialect_optionç  sf  € ô2 !×-Ñ-¨g¯l©lÑ;ˆØÑØˆLàŸL™L¨¯©¸Ó<Ô<à#Ñ+Ø—<‘<Ð#6Ó6à×+Ñ+¨G¯L©LÑ9¸-ÑHÐHð —‘ × 4Ñ 4Ó4Ø!Ø×'Ñ'¨¯©Ñ5×CÑCóDð ×+Ñ+¨G¯L©LÑ9¸-ÑHÐHð
 $×';Ñ';Ó;Ø!Ø×'Ñ'Ð(;Ñ<×JÑJóKô  ØÐ1Ð2°!°M°?ð C!Ø!(§¡ ð /àŸ™�~ Q } o°Rð9ð "òð ×+Ñ+Ð,?Ñ@ÀÑOÐOð ×'Ñ'¨¯©Ñ5°mÑDÐDð
 ˆLr`   c                ó‚   • [         R                  U   nUc  [        R                  " SU-  5      eX;  a  0 X@'   X4U    U'   g)a—  Add a new kind of dialect-specific keyword argument for this class.

E.g.::

    Index.argument_for("mydialect", "length", None)

    some_index = Index("a", "b", mydialect_length=5)

The :meth:`.DialectKWArgs.argument_for` method is a per-argument
way adding extra arguments to the
:attr:`.DefaultDialect.construct_arguments` dictionary. This
dictionary provides a list of argument names accepted by various
schema-level constructs on behalf of a dialect.

New dialects should typically specify this dictionary all at once as a
data member of the dialect class.  The use case for ad-hoc addition of
argument names is typically for end-user code that is also using
a custom compilation scheme which consumes the additional arguments.

:param dialect_name: name of a dialect.  The dialect must be
 locatable, else a :class:`.NoSuchModuleError` is raised.   The
 dialect must also include an existing
 :attr:`.DefaultDialect.construct_arguments` collection, indicating
 that it participates in the keyword-argument validation and default
 system, else :class:`.ArgumentError` is raised.  If the dialect does
 not include this collection, then any keyword argument can be
 specified on behalf of this dialect already.  All dialects packaged
 within SQLAlchemy include this collection, however for third party
 dialects, support may vary.

:param argument_name: name of the parameter.

:param default: default value of the parameter.

NzRDialect '%s' does have keyword-argument validation and defaults enabled configured)r@  ri  r*   r'  )r{   r;  rj  r|   Úconstruct_arg_dictionarys        r]   Úargument_forÚDialectKWArgs.argument_for0  s_   € ôR ×&Ñ& |Ñ4ð 	!ð $Ñ+Ü×#Ò#ð=Ø?KñLóð ð Ó.Ø,.Ð$Ñ)Ø7> Ñ% mÒ4r`   c                ó   • [        U 5      $ )aL  A collection of keyword arguments specified as dialect-specific
options to this construct.

The arguments are present here in their original ``<dialect>_<kwarg>``
format.  Only arguments that were actually passed are included;
unlike the :attr:`.DialectKWArgs.dialect_options` collection, which
contains all options known by this dialect including defaults.

The collection is also writable; keys are accepted of the
form ``<dialect>_<kwarg>`` where the value will be assembled
into the list of options.

.. seealso::

    :attr:`.DialectKWArgs.dialect_options` - nested dictionary form

)r  r[   s    r]   Údialect_kwargsÚDialectKWArgs.dialect_kwargsd  s   € ô& ˜tÓ$Ð$r`   c                ó   • U R                   $ )z4A synonym for :attr:`.DialectKWArgs.dialect_kwargs`.)rr  r[   s    r]   r¥   ÚDialectKWArgs.kwargsy  s   € ð ×"Ñ"Ð"r`   z0util.PopulateDict[str, Optional[Dict[Any, Any]]]ri  c                ó  • [         R                  U   n[        5       nUc  UR                  R	                  SS 05        U$ [        U R                  5       H'  n X;   d  M
  UR                  R	                  X    5        M)     U$ )NÚ*)r@  ri  rG  rJ  ÚupdateÚreversedÚ__mro__)r{   r;  rn  Úds       r]   Ú_kw_reg_for_dialect_clsÚ%DialectKWArgs._kw_reg_for_dialect_cls‚  sv   € ä#0×#=Ñ#=¸lÑ#KÐ ÜÓˆà#Ñ+Ø�K‰K×Ñ  T˜{Ô+ð
 ˆô   §¡Ö,�ØÕ2Ø—K‘K×&Ñ&Ð'?Ñ'DÖEñ -ð ˆr`   c                óB   • [         R                  " U R                  5      $ )a¤  A collection of keyword arguments specified as dialect-specific
options to this construct.

This is a two-level nested registry, keyed to ``<dialect_name>``
and ``<argument_name>``.  For example, the ``postgresql_where``
argument would be locatable as::

    arg = my_object.dialect_options["postgresql"]["where"]

.. versionadded:: 0.9.2

.. seealso::

    :attr:`.DialectKWArgs.dialect_kwargs` - flat dictionary form

)r+   ÚPopulateDictr|  r[   s    r]   r!  ÚDialectKWArgs.dialect_options�  s   € ô& × Ò  ×!=Ñ!=Ó>Ð>r`   c           	     óB  • U(       d  g U H�  n[         R                  " SU5      nU(       d  [        SU-  5      eUR                  SS5      u  pE U R                  U   nSU;  a1  XV;  a,  [
        R                  " SU< SU< SU R                  < 35      eX   Xe'   M’     g ! [
        R                   aj    [        R                  " S	U< S
U< 35        [        5       =U R                  U'   nUR                  R                  SS 05        X   UR                  U'    GM  f = f)Nz^(.+?)_(.+)$zGAdditional arguments should be named <dialectname>_<argument>, got '%s'r   r(   rw  z	Argument z is not accepted by dialect z on behalf of zCan't validate argument z,; can't locate any SQLAlchemy dialect named )ÚreÚmatchÚ	TypeErrorÚgroupr!  r*   r'  rî   r"  r+   ÚwarnrG  rJ  rx  r1  )r\   r¥   ÚkÚmr;  Úarg_namern  r{  s           r]   Ú_validate_dialect_kwargsÚ&DialectKWArgs._validate_dialect_kwargs¤  s!  € ö ØãˆAÜ—’˜¨Ó+ˆAÞÜð?ØABñCóð ð &'§W¡W¨Q°£]Ñ"ˆLðCØ+/×+?Ñ+?ÀÑ+MÐ(ð Ð7Ó7Ø Ó@ä×+Ó+ó ›l¨D¯N«Nð<óð ð :@¹Ð,Ó6ò? øô ×(Ñ(ó 6Ü—	“	ó š,ð(ôô
 :IÓ9JÐJ�×$Ñ$ \Ñ2°QØ—‘×"Ñ" C¨ ;Ô/Ø,2©I�—‘ Õ)ð6ús   ÁB Â A9DÄD)
r  rR   rj  rŒ   re  r   rf  úOptional[str]r   r   )r;  rŒ   rj  rŒ   r|   r   r   rµ   )r   r  )r;  rŒ   r   rG  )r   z'util.PopulateDict[str, _DialectArgDict])r¥   úDict[str, Any]r   rµ   )rb   rc   rd   re   r¶   r·   r'   Údp_dialect_optionsrd  r€   rk  r�   ro  Úpropertyrr  r¥   r+   r  rb  ri  r|  Úmemoized_propertyr!  rŠ  rg   ra   r`   r]   r@  r@  Ô  s#  ‡ ñ
ð €Ið 
Ð-×@Ñ@ÐAðAÐ&Ð(=ó ð Ø-1ñGàðGð ðGð
 ðGð +ðGð 
õGðR ð1?Øð1?Ø/2ð1?Ø=@ð1?à	ó1?ó ð1?ðf ó%ó ð%ð( ó#ó ð#ð
 	×ÒÐ-Ó.ð ÐBó ð ó
ó ð
ð 
×Ñó?ó ð?÷(%Cr`   r@  c                  ó¼   • \ rS rSr% SrSr0 rS\S'   S\S'   \        SS j5       r	S	 r
\    SS
 j5       r\      SS j5       r\      SS j5       rSrg)ÚCompileStateiÌ  aÀ  Produces additional object state necessary for a statement to be
compiled.

the :class:`.CompileState` class is at the base of classes that assemble
state for a particular statement object that is then used by the
compiler.   This process is essentially an extension of the process that
the SQLCompiler.visit_XYZ() method takes, however there is an emphasis
on converting raw user intent into more organized structures rather than
producing string output.   The top-level :class:`.CompileState` for the
statement being executed is also accessible when the execution context
works with invoking the statement and collecting results.

The production of :class:`.CompileState` is specific to the compiler,  such
as within the :meth:`.SQLCompiler.visit_insert`,
:meth:`.SQLCompiler.visit_select` etc. methods.  These methods are also
responsible for associating the :class:`.CompileState` with the
:class:`.SQLCompiler` itself, if the statement is the "toplevel" statement,
i.e. the outermost SQL statement that's actually being executed.
There can be other :class:`.CompileState` objects that are not the
toplevel, such as when a SELECT subquery or CTE-nested
INSERT/UPDATE/DELETE is generated.

.. versionadded:: 1.4

)Ú	statementÚ_ambiguous_table_name_mapz)Dict[Tuple[str, str], Type[CompileState]]Úpluginsz Optional[_AmbiguousTableNameMap]r”  c                ó^  • UR                   (       ab  UR                   R                  SS5      nU R                  R                  XAR                  4S 5      nUc  U R                  SUR                  4   nOU R                  SUR                  4   nXPL a	  U " X40 UD6$ UR                  " X40 UD6$ ©NÚcompile_state_pluginr|   )Ú_propagate_attrsrí   r•  Ú_effective_plugin_targetÚcreate_for_statement)r{   r“  Úcompilerr®   Úplugin_nameÚklasss         r]   r›  Ú!CompileState.create_for_statementí  s¹   € ð ×%×%Ø#×4Ñ4×8Ñ8Ø&¨	óˆKð —K‘K—O‘OØ×@Ñ@ÐAÀ4óˆEð ‰}ØŸ™Ø 	× BÑ BÐCñ�øð
 —K‘KØ˜I×>Ñ>Ð?ñˆEð Š<Ù�yÑ1¨bÑ1Ð1à×-Ò-¨iÑHÀRÑHÐHr`   c                ó   • Xl         g rx   ©r“  )r\   r“  rœ  r®   s       r]   rÆ   ÚCompileState.__init__	  s   € Ø"�r`   c                óö   • UR                   R                  SS 5      nU(       a+  X!R                  4nX0R                  ;   a  U R                  U   $  U R                  SUR                  4   $ ! [         a     g f = fr—  )r™  rí   rš  r•  r  )r{   r“  r�  r‰   s       r]   Úget_plugin_classÚCompileState.get_plugin_class  s|   € ð  ×0Ñ0×4Ñ4Ø" Dó
ˆö Ø× BÑ BÐCˆCØ—k‘kÓ!Ø—{‘{ 3Ñ'Ð'ð	Ø—;‘; 	¨9×+MÑ+MÐNÑOÐOøÜó 	Ùð	ús   ÁA+ Á+
A8Á7A8c                óX   •  U R                   X!R                  4   $ ! [         a     g f = frx   )r•  rš  r  )r{   r“  r�  s      r]   Ú_get_plugin_class_for_pluginÚ)CompileState._get_plugin_class_for_plugin"  s8   € ð	Ø—;‘;Ø×@Ñ@ÐAñð øô ó 	Ùð	ús   ‚ œ
)¨)c                ó   ^ ^^• U UU4S jnU$ )Nc                ó*   >• U TR                   TT4'   U $ rx   )r•  )Úcls_to_decorater{   r�  Ú
visit_names    €€€r]   ÚdecorateÚ)CompileState.plugin_for.<locals>.decorate1  s   ø€ Ø5DˆC�K‰K˜ jÐ1Ñ2Ø"Ð"r`   ra   )r{   r�  r¬  r­  s   ``` r]   Ú
plugin_forÚCompileState.plugin_for-  s   ú€ ÷	#ð ˆr`   r¡  N)r“  Ú
Executablerœ  r;   r®   r   r   r’  )r“  r±  r   úOptional[Type[CompileState]])r“  r±  r�  rŒ   r   r²  )r�  rŒ   r¬  rŒ   r   úCallable[[_Fn], _Fn])rb   rc   rd   re   r¶   r·   r•  r€   r�   r›  rÆ   r¤  r§  r¯  rg   ra   r`   r]   r’  r’  Ì  sØ   ‡ ñð4 ;€Ià9;€GÐ6Ó;à?Ó?àðIØ"ðIØ.9ðIØADðIà	óIó ðIò6#ð ðØ"ðà	%óó ðð* ðØ"ðØ14ðà	%óó ðð ðØðØ+.ðà	óó ór`   r’  c                  ó"   • \ rS rSrSrSS jrSrg)Ú
Generativei8  zQProvide a method-chaining pattern in conjunction with the
@_generative decorator.c                óF  • U R                   nU R                  nUR                  U5      nU(       aK  U R                  R	                  5       R                  5        VVs0 s H  u  pEXA;  d  M  XE_M     snnUl        U$ U R                  R	                  5       Ul        U$ s  snnf rx   )Ú_memoized_keysrî   r¾   Ú__dict__ÚcopyÚitems)r\   Úskipr{   Úsr‡  Úvs         r]   rÜ   ÚGenerative._generate<  sŒ   € Ø×"Ñ"ˆØ�n‰nˆØ�K‰K˜ÓˆÞð "&§¡×!3Ñ!3Ó!5×!;Ñ!;Ô!=ôÚ!=™˜ÀÁ“�’Ñ!=òˆAŒJð
 ˆð Ÿ™×+Ñ+Ó-ˆAŒJØˆùós   ÁBÁ+Bra   NrÞ   )rb   rc   rd   re   r¶   rÜ   rg   ra   r`   r]   rµ  rµ  8  s   † ñ÷r`   rµ  c                  ó&   • \ rS rSrSrSrSS jrSrg)ÚInPlaceGenerativeiJ  zgProvide a method-chaining pattern in conjunction with the
@_generative decorator that mutates in place.ra   c                óh   • U R                   nU H  nU R                  R                  US 5        M!     U $ rx   )r·  r¸  rö   )r\   r»  r‡  s      r]   rÜ   ÚInPlaceGenerative._generateP  s0   € Ø×"Ñ"ˆãˆAØ�M‰M×Ñ˜a Ö&ñ àˆr`   NrÞ   )rb   rc   rd   re   r¶   r·   rÜ   rg   ra   r`   r]   rÀ  rÀ  J  s   † ñ5ð €I÷r`   rÀ  c                  ób   • \ rS rSr% SrSrS\S'   \R                  r	S\S'   \
R                  rSrg)	ÚHasCompileStateiX  z=A class that has a :class:`.CompileState` associated with it.Nr²  Ú_compile_state_pluginúutil.immutabledict[str, Any]Ú_attributesra   )rb   rc   rd   re   r¶   rÅ  r€   r+   Ú
EMPTY_DICTrÇ  r’  r›  Ú_compile_state_factoryrg   ra   r`   r]   rÄ  rÄ  X  s,   ‡ ÙGà:>ÐÐ7Ó>à04·±€KÐ-Ó?à)×>Ñ>Ór`   rÄ  c                  ó\   • \ rS rSr% SrS\S'   S r\(       a  SS jrSS jr	SS jr
S	rg
S	rg
)Ú_MetaOptionsib  zÚmetaclass for the Options class.

This metaclass is actually necessary despite the availability of the
``__init_subclass__()`` hook as this type also provides custom class-level
behavior for the ``__add__()`` method.

úTuple[str, ...]Ú_cache_attrsc                ó  • U " 5       n[        U5      R                  U R                  5      (       a5  [        SU < S[        U5      R                  U R                  5      < 35      eUR                  R                  U5        U$ ©Nz<dictionary contains attributes not covered by Options class z: )r  Ú
differencerÍ  r„  r¸  rx  ©r\   ÚotherÚo1s      r]   Ú__add__Ú_MetaOptions.__add__m  sl   € Ù‹Vˆäˆu‹:× Ñ  ×!2Ñ!2×3Ñ3Ýó œ˜U›×.Ñ.¨t×/@Ñ/@ÕAðCóð ð 	�‰×Ñ˜5Ô!Øˆ	r`   c                ó   • g rx   ra   rˆ   s     r]   rŠ   Ú_MetaOptions.__getattr__|  ó   € °r`   c                ó   • g rx   ra   rV  s      r]   Ú__setattr__Ú_MetaOptions.__setattr__~  ó   € ¸Sr`   c                ó   • g rx   ra   rˆ   s     r]   Ú__delattr__Ú_MetaOptions.__delattr__€  ó   € °r`   ra   NrA  rB  rC  )rb   rc   rd   re   r¶   r€   rÔ  r   rŠ   rÚ  rÞ  rg   ra   r`   r]   rË  rË  b  s'   ‡ ñð "Ó!òö ä3ä@ç4ò r`   rË  c                  óZ  ^ • \ rS rSr% SrSrS\S'   SU 4S jjrSS jrS r	S	 r
SS
 jr\SS j5       r\SS j5       r\SS j5       r\R$                  rS\S'   \R(                  SS j5       r\SS j5       r\          SS j5       r\(       a  SS jrSS jrS S jrSrU =r$ SrU =r$ )!ÚOptionsiƒ  z,A cacheable option dictionary with defaults.ra   rÌ  rÍ  c                óz   >• U R                   n[        [        S U 5       5      5      U l        [        TU ]  5         g )Nc              3  óf   #   • U  H'  nUR                  S 5      (       a  M  US;  d  M#  Uv •  M)     g7f)Ú__)Ú_cache_key_traversalN)Ú
startswith)r2  r{  s     r]   r3  Ú,Options.__init_subclass__.<locals>.<genexpr>�  s5   é € ð â�AØ—|‘| D×)ó ð Ð6Ñ6÷ ‘Úùs   ‚1 1¨	1)r¸  ÚtupleÚsortedrÍ  ÚsuperÚ__init_subclass__)r{   Údict_rî   s     €r]   rì  ÚOptions.__init_subclass__Š  s;   ø€ Ø—‘ˆÜ Üñ áóó ó
ˆÔô 	‰Ñ!Õ#r`   c                ó:   • U R                   R                  U5        g rx   )r¸  rx  r­   s     r]   rÆ   ÚOptions.__init__–  s   € Ø�‰×Ñ˜RÕ r`   c                óŒ  • U R                   R                  U R                   5      nUR                  R                  U R                  5        [	        U5      R                  U R                  5      (       a5  [        SU < S[	        U5      R                  U R                  5      < 35      eUR                  R                  U5        U$ rÏ  )rî   r¾   r¸  rx  r  rÐ  rÍ  r„  rÑ  s      r]   rÔ  ÚOptions.__add__™  s“   € Ø�^‰^×#Ñ# D§N¡NÓ3ˆØ
�‰×Ñ˜4Ÿ=™=Ô)äˆu‹:× Ñ  ×!2Ñ!2×3Ñ3Ýó œ˜U›×.Ñ.¨t×/@Ñ/@ÕAðCóð ð 	�‰×Ñ˜5Ô!Øˆ	r`   c                óŠ   • [        U R                  UR                  5       H  u  p#[        X5      [        X5      :w  d  M    g   g©NFT)r   rÍ  Úgetattr)r\   rÒ  r	  r
  s       r]   Ú__eq__ÚOptions.__eq__§  s>   € ô   × 1Ñ 1°5×3EÑ3EÖF‰DˆAÜ�tÓ¤7¨5Ó#4Õ4Ùñ Gð r`   c                ó†   ^ • T R                   R                  < SSR                  U 4S jT R                   5       5      < S3$ )NÚ(ú, c              3  ót   >#   • U  H-  nUTR                   ;   d  M  U< S TR                   U   < 3v •  M/     g7f)Ú=N©r¸  )r2  r‡  r\   s     €r]   r3  Ú#Options.__repr__.<locals>.<genexpr>´  s4   øé € ð â*�AØ˜Ÿ™Ñ%ó 0›1˜dŸm™m¨AÓ.Õ/Ú*ùs   ƒ8›8Ú))rî   rb   ÚjoinrÍ  r[   s   `r]   r^   ÚOptions.__repr__¯  s;   ø€ ð �N‰N×#Ô#Ø�I‰Iô à×*Ò*óö ð
ð 	
r`   c                ó   • [        X5      $ rx   )Ú
issubclass)r{   rž  s     r]   Ú
isinstanceÚOptions.isinstance»  s   € ä˜#Ó%Ð%r`   c                ó&   • X[        X5      U-   0-   $ rx   )rõ  )r\   rZ   r(  s      r]   Úadd_to_elementÚOptions.add_to_element¿  s   € àœW TÓ0°5Ñ8Ð9Ñ9Ð9r`   c                ó   • U R                   $ rx   rý  r[   s    r]   Ú_state_dict_instÚOptions._state_dict_instÃ  s   € à�}‰}Ðr`   rÆ  Ú_state_dict_constc                ó   • U R                   $ rx   )r  )r{   s    r]   Ú_state_dictÚOptions._state_dictÉ  s   € à×$Ñ$Ð$r`   c           
     óT  • UR                  5       nXR                  La‡  UR                  (       av  [        UR                  5      R	                  U R                  5      (       aC  [        SU< SU < S[        UR                  5      R	                  U R                  5      < 35      eX-   $ )Nzother element z is not empty, is not of type z+, and contains attributes not covered here )r  rî   rÍ  r  rÐ  r„  )r{   rÒ  r{  s      r]   Ú
safe_mergeÚOptions.safe_mergeÍ  s‰   € à×ÑÓˆð —‘Ò&Ø×"×"Ü�E×&Ñ&Ó'×2Ñ2°3×3CÑ3C×DÑDåó ÛÜ˜×*Ñ*Ó+×6Ñ6°s×7GÑ7GÕHðóð ð ‰wˆr`   c                ó8  • UR                  [        U5      R                  U5      5      nUR                  X5      nU(       aW  0 nU H"  nSU-   n	Xƒ;   a  X8   Xy'   M  X„;   d  M  XH   Xy'   M$     Xg-   n
[        R
                  " U5      R                  X05      nX£4$ Xc4$ )aÅ  process Options argument in terms of execution options.


e.g.::

    (
        load_options,
        execution_options,
    ) = QueryContext.default_load_options.from_execution_options(
        "_sa_orm_load_options",
        {"populate_existing", "autoflush", "yield_per"},
        execution_options,
        statement._execution_options,
    )

get back the Options and refresh "_sa_orm_load_options" in the
exec options dict w/ the Options as well

r  )r  r  rM  rí   r+   ÚimmutabledictÚ
merge_with)r{   r‰   ÚattrsÚexec_optionsÚstatement_exec_optionsÚcheck_argnamesÚexisting_optionsÚresultÚargnameÚlocalÚnew_optionss              r]   Úfrom_execution_optionsÚOptions.from_execution_optionsæ  s·   € ð< ×+Ñ+Ü�Ó×#Ñ#Ð$:Ó;ó
ˆð (×+Ñ+¨CÓ5ÐæØˆFÛ)�Ø˜g™�ØÓ*Ø$0Ñ$9�F“MØÕ6Ø$:Ñ$C�F“Mñ *ð +Ñ3ˆKÜ×-Ò-¨lÓ;×FÑFØÐ"óˆLð Ð,Ð,ð $Ð1Ð1r`   c                ó   • g rx   ra   rˆ   s     r]   rŠ   ÚOptions.__getattr__  rØ  r`   c                ó   • g rx   ra   rV  s      r]   rÚ  ÚOptions.__setattr__   rÜ  r`   c                ó   • g rx   ra   rˆ   s     r]   rÞ  ÚOptions.__delattr__"  rà  r`   rÌ   )r®   r   r   rµ   ©r   rŒ   )rž  z	Type[Any]r   r�   )rZ   rŒ   r(  rŒ   r   r   )r   úMapping[str, Any])rÒ  z	'Options'r   r   )
r‰   rŒ   r  zset[str]r  r(  r  r(  r   z#Tuple['Options', Mapping[str, Any]]rA  rB  rC  )rb   rc   rd   re   r¶   r·   r€   rì  rÆ   rÔ  rö  r^   r�   r  r-   r  r
  r+   rÈ  r  Ú
classlevelr  r  r  r   rŠ   rÚ  rÞ  rg   Ú__classcell__)rî   s   @r]   râ  râ  ƒ  sÿ   ø‡ Ù6à€Ià!Ó!÷
$ô!òòô

ð ó&ó ð&ð ó:ó ð:ð óó ðð 7;·o±oÐÐ3ÓEà× Ñ ó%ó !ð%ð óó ðð0 ð32àð32ð ð32ð (ð	32ð
 !2ð32ð 
-ó32ó ð32öj ä3ä@ç4Ò4õ r`   râ  )Ú	metaclassc                  ó€   • \ rS rSrSr\      SS j5       r\R                        SS j5       r\S	S j5       r	Sr
g)
ÚCacheableOptionsi%  ra   c                ó0   • [         R                  " XU5      $ rx   )r!   Ú_gen_cache_key)r\   rH   Ú
bindparamss      r]   Ú_gen_cache_key_instÚ$CacheableOptions._gen_cache_key_inst(  s   € ô ×)Ò)¨$¸*ÓEÐEr`   c                ó
   • U S4$ rü   ra   )r{   rH   r0  s      r]   r/  ÚCacheableOptions._gen_cache_key.  s   € ð �RˆyÐr`   c                ó.   • [         R                  " U 5      $ rx   )r!   Ú_generate_cache_key_for_objectr[   s    r]   Ú_generate_cache_keyÚ$CacheableOptions._generate_cache_key4  s   € ä×9Ò9¸$Ó?Ð?r`   N)rH   r   r0  úList[BindParameter[Any]]r   zOptional[Tuple[Any]])rH   z
'anon_map'r0  r9  r   zTuple[CacheableOptions, Any])r   zOptional[CacheKey])rb   rc   rd   re   r·   r-   r1  r)  r/  r7  rg   ra   r`   r]   r-  r-  %  s~   † Ø€IàðFØðFØ)AðFà	óFó ðFð
 ×#Ñ#ðØ!ðØ/Gðà	%óó $ðð
 ó@ó ó@r`   r-  c                  ól   • \ rS rSr% Sr\R                  rS\S'   Sr	S\S'   Sr
S	\S
'   SrS	\S'   S rSrg)ÚExecutableOptioni9  ra   rM   Ú_annotationsÚexecutable_optionrŒ   Ú__visit_name__Fr�   Ú_is_has_cache_keyTÚ_is_corec                ó„   • U R                   R                  U R                   5      n[        U R                  5      Ul        U$ )z/Create a shallow copy of this ExecutableOption.)rî   r¾   r`  r¸  )r\   r®   rÖ   s      r]   r¯   ÚExecutableOption._cloneD  s/   € à�N‰N×"Ñ" 4§>¡>Ó2ˆÜ˜$Ÿ-™-Ó(ˆŒ
Øˆr`   N)rb   rc   rd   re   r·   r+   rÈ  r<  r€   r>  r?  r@  r¯   rg   ra   r`   r]   r;  r;  9  s:   ‡ Ø€Ià-1¯_©_€LÐ*Ó<à-€N�CÓ-à#Ð�tÓ#à€HˆdÓõr`   r;  c                  óü  • \ rS rSr% SrSrS\S'   \R                  r	S\S'   Sr
S\S	'   S
rS\S'   S
rS\S'   S\S'   S\R                  4S\R                   4S\R"                  4/rSrS\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   \(       a6  S\S'   SSS.             S-S jjr        S.S jr        S/S jr\R<                  S0S  j5       r\ S1S! j5       r!\"S2S" j5       r#\"S3S# j5       r$\"S4S$ j5       r%\"      S5S% j5       r&\'S&S&S&SSS&S&S&S&SSS&S&S&S&S&SS'.                                     S6S( jj5       r(\'S7S) j5       r(\"S8S* j5       r(S9S+ jr)S,r*g):r±  iK  zèMark a :class:`_expression.ClauseElement` as supporting execution.

:class:`.Executable` is a superclass for all "statement" types
of objects, including :func:`select`, :func:`delete`, :func:`update`,
:func:`insert`, :func:`text`.

Tr�   Úsupports_executionrM   Ú_execution_optionsFÚ_is_default_generatorra   zTuple[ExecutableOption, ...]Ú_with_optionsz6Tuple[Tuple[Callable[[CompileState], None], Any], ...]Ú_with_context_optionsz9Optional[Union[Type[CacheableOptions], CacheableOptions]]Ú_compile_optionsr™  Ú	is_selectÚis_from_statementÚ	is_updateÚ	is_insertÚis_textÚ	is_deleteÚis_dmlrŒ   r>  N)Úfor_executemanyÚschema_translate_mapc               ó   • g rx   ra   )r\   r  Úcompiled_cacheÚcolumn_keysrQ  rR  r®   s          r]   Ú_compile_w_cacheÚExecutable._compile_w_cacheq  s   € ð r`   c                ó   • g rx   ra   ©r\   Ú
connectionÚdistilled_paramsÚexecution_optionss       r]   Ú_execute_on_connectionÚ!Executable._execute_on_connection~  s   € ð
 !$r`   c                ó   • g rx   ra   rY  s       r]   Ú_execute_on_scalarÚExecutable._execute_on_scalar…  s   € ð
 r`   c                ó   • [        5       erx   r¡   r[   s    r]   Ú_all_selected_columnsÚ Executable._all_selected_columnsŒ  rÃ   r`   c                ó   • U R                   $ rx   )r>  r[   s    r]   rš  Ú#Executable._effective_plugin_target�  s   € à×"Ñ"Ð"r`   c                óP   • U =R                   [        S U 5       5      -  sl         U $ )a²  Apply options to this statement.

In the general sense, options are any kind of Python object
that can be interpreted by the SQL compiler for the statement.
These options can be consumed by specific dialects or specific kinds
of compilers.

The most commonly known kind of option are the ORM level options
that apply "eager load" and other loading behaviors to an ORM
query.   However, options can theoretically be used for many other
purposes.

For background on specific kinds of options for specific kinds of
statements, refer to the documentation for those option objects.

.. versionchanged:: 1.4 - added :meth:`.Executable.options` to
   Core statement objects towards the goal of allowing unified
   Core / ORM querying capabilities.

.. seealso::

    :ref:`loading_columns` - refers to options specific to the usage
    of ORM queries

    :ref:`relationship_loader_options` - refers to options specific
    to the usage of ORM queries

c              3  ól   #   • U  H*  n[         R                  " [        R                  U5      v •  M,     g 7frx   )r4   Úexpectr   ÚExecutableOptionRole)r2  r#  s     r]   r3  Ú%Executable.options.<locals>.<genexpr>²  s-   é € ð $
â�ô ×ÒœU×7Ñ7¸×=Ð=Úùs   ‚24)rG  ré  ©r\   Úoptionss     r]   rm  ÚExecutable.options”  s0   € ð< 	×Òœeñ $
áó$
ó 
ñ 	
Õð ˆr`   c                ó   • Xl         U $ )zlAssign the compile options to a new value.

:param compile_options: appropriate CacheableOptions structure

©rI  )r\   Úcompile_optionss     r]   Ú_set_compile_optionsÚExecutable._set_compile_options¸  s   € ð !0ÔØˆr`   c                óN   • U R                   c   eU =R                   U-  sl         U $ )z*update the _compile_options with new keys.rp  rl  s     r]   Ú_update_compile_optionsÚ"Executable._update_compile_optionsÃ  s,   € ð ×$Ñ$Ñ0Ð0Ð0Ø×Ò Ñ(ÕØˆr`   c                ó4   • U =R                   X44-  sl         U $ )a  Add a context option to this statement.

These are callable functions that will
be given the CompileState object upon compilation.

A second argument cache_args is required, which will be combined with
the ``__code__`` identity of the function itself in order to produce a
cache key.

)rH  )r\   Ú	callable_Ú
cache_argss      r]   Ú_add_context_optionÚExecutable._add_context_optionË  s    € ð  	×"Ò"¨	Ð'>Ð&@Ñ@Õ"Øˆr`   .)rT  Úlogging_tokenÚisolation_levelÚno_parametersÚstream_resultsÚmax_row_bufferÚ	yield_perÚinsertmanyvalues_page_sizerR  Úpopulate_existingÚ	autoflushÚsynchronize_sessionÚdml_strategyÚrender_nullsÚis_delete_usingÚis_update_fromÚpreserve_rowcountc               ó   • g rx   ra   )r\   rT  r|  r}  r~  r  r€  r�  r‚  rR  rƒ  r„  r…  r†  r‡  rˆ  r‰  rŠ  r#  s                      r]   r\  ÚExecutable.execution_optionsÞ  s   € ð, r`   c                ó   • g rx   ra   )r\   r#  s     r]   r\  rŒ  ö  s   € Ø58r`   c                ó¶   • SU;   a  [         R                  " S5      eSU;   a  [         R                  " S5      eU R                  R                  U5      U l        U $ )a.  Set non-SQL options for the statement which take effect during
execution.

Execution options can be set at many scopes, including per-statement,
per-connection, or per execution, using methods such as
:meth:`_engine.Connection.execution_options` and parameters which
accept a dictionary of options such as
:paramref:`_engine.Connection.execute.execution_options` and
:paramref:`_orm.Session.execute.execution_options`.

The primary characteristic of an execution option, as opposed to
other kinds of options such as ORM loader options, is that
**execution options never affect the compiled SQL of a query, only
things that affect how the SQL statement itself is invoked or how
results are fetched**.  That is, execution options are not part of
what's accommodated by SQL compilation nor are they considered part of
the cached state of a statement.

The :meth:`_sql.Executable.execution_options` method is
:term:`generative`, as
is the case for the method as applied to the :class:`_engine.Engine`
and :class:`_orm.Query` objects, which means when the method is called,
a copy of the object is returned, which applies the given parameters to
that new copy, but leaves the original unchanged::

    statement = select(table.c.x, table.c.y)
    new_statement = statement.execution_options(my_option=True)

An exception to this behavior is the :class:`_engine.Connection`
object, where the :meth:`_engine.Connection.execution_options` method
is explicitly **not** generative.

The kinds of options that may be passed to
:meth:`_sql.Executable.execution_options` and other related methods and
parameter dictionaries include parameters that are explicitly consumed
by SQLAlchemy Core or ORM, as well as arbitrary keyword arguments not
defined by SQLAlchemy, which means the methods and/or parameter
dictionaries may be used for user-defined parameters that interact with
custom code, which may access the parameters using methods such as
:meth:`_sql.Executable.get_execution_options` and
:meth:`_engine.Connection.get_execution_options`, or within selected
event hooks using a dedicated ``execution_options`` event parameter
such as
:paramref:`_events.ConnectionEvents.before_execute.execution_options`
or :attr:`_orm.ORMExecuteState.execution_options`, e.g.::

     from sqlalchemy import event


     @event.listens_for(some_engine, "before_execute")
     def _process_opt(conn, statement, multiparams, params, execution_options):
         "run a SQL function before invoking a statement"

         if execution_options.get("do_special_thing", False):
             conn.exec_driver_sql("run_special_function()")

Within the scope of options that are explicitly recognized by
SQLAlchemy, most apply to specific classes of objects and not others.
The most common execution options include:

* :paramref:`_engine.Connection.execution_options.isolation_level` -
  sets the isolation level for a connection or a class of connections
  via an :class:`_engine.Engine`.  This option is accepted only
  by :class:`_engine.Connection` or :class:`_engine.Engine`.

* :paramref:`_engine.Connection.execution_options.stream_results` -
  indicates results should be fetched using a server side cursor;
  this option is accepted by :class:`_engine.Connection`, by the
  :paramref:`_engine.Connection.execute.execution_options` parameter
  on :meth:`_engine.Connection.execute`, and additionally by
  :meth:`_sql.Executable.execution_options` on a SQL statement object,
  as well as by ORM constructs like :meth:`_orm.Session.execute`.

* :paramref:`_engine.Connection.execution_options.compiled_cache` -
  indicates a dictionary that will serve as the
  :ref:`SQL compilation cache <sql_caching>`
  for a :class:`_engine.Connection` or :class:`_engine.Engine`, as
  well as for ORM methods like :meth:`_orm.Session.execute`.
  Can be passed as ``None`` to disable caching for statements.
  This option is not accepted by
  :meth:`_sql.Executable.execution_options` as it is inadvisable to
  carry along a compilation cache within a statement object.

* :paramref:`_engine.Connection.execution_options.schema_translate_map`
  - a mapping of schema names used by the
  :ref:`Schema Translate Map <schema_translating>` feature, accepted
  by :class:`_engine.Connection`, :class:`_engine.Engine`,
  :class:`_sql.Executable`, as well as by ORM constructs
  like :meth:`_orm.Session.execute`.

.. seealso::

    :meth:`_engine.Connection.execution_options`

    :paramref:`_engine.Connection.execute.execution_options`

    :paramref:`_orm.Session.execute.execution_options`

    :ref:`orm_queryguide_execution_options` - documentation on all
    ORM-specific execution options

r}  z 'isolation_level' execution option may only be specified on Connection.execution_options(), or per-engine using the isolation_level argument to create_engine().rT  zm'compiled_cache' execution option may only be specified on Connection.execution_options(), not per statement.)r*   r'  rE  rM  r­   s     r]   r\  rŒ  ù  sh   € ðP  Ó"Ü×#Ò#ð/óð ð ˜rÓ!Ü×#Ò#ðHóð ð #'×"9Ñ"9×"?Ñ"?ÀÓ"CˆÔØˆr`   c                ó   • U R                   $ )z‘Get the non-SQL options which will take effect during execution.

.. versionadded:: 1.3

.. seealso::

    :meth:`.Executable.execution_options`
)rE  r[   s    r]   Úget_execution_optionsÚ Executable.get_execution_optionsp  s   € ð ×&Ñ&Ð&r`   )rI  rE  )r  rR   rT  úOptional[CompiledCacheType]rU  z	List[str]rQ  r�   rR  ú Optional[SchemaTranslateMapType]r®   r   r   zCTuple[Compiled, Optional[Sequence[BindParameter[Any]]], CacheStats])rZ  rI   r[  rK   r\  rQ   r   zCursorResult[Any])rZ  rI   r[  rK   r\  rQ   r   r   )r   rF   r'  )rm  r;  r   r2   )rq  r-  r   r2   )rm  r-  r   r2   )rx  zCallable[[CompileState], None]ry  r   r   r2   )&rT  r’  r|  rŒ   r}  rS   r~  r�   r  r�   r€  rE  r�  rE  r‚  rE  rR  r“  rƒ  r�   r„  r�   r…  r8   r†  r7   r‡  r�   rˆ  r�   r‰  r�   rŠ  r�   r#  r   r   r2   )r#  r   r   r2   )r®   r   r   r2   )r   rL   )+rb   rc   rd   re   r¶   rD  r€   r+   rÈ  rE  rF  rG  rH  r'   Údp_executable_optionsr%   Údp_with_context_optionsÚdp_propagate_attrsÚ_executable_traverse_internalsrJ  rK  rL  rM  rN  rO  rP  r   rV  r]  r`  r”   rc  r�  rš  rä   rm  rr  ru  rz  r   r\  r�  rg   ra   r`   r]   r±  r±  K  sX  ‡ ñð  $Ð˜Ó#Ø37·?±?ÐÐ0ÓBØ"'Ð˜4Ó'Ø24€MÐ/Ó4ð 	ð ð ó ð PÓOð 
Ð+×AÑAÐBà#Ø%×=Ñ=ð	
ð 
Ð6×IÑIÐJð&Ð"ð €IˆtÓØ#Ð�tÓ#Ø€IˆtÓØ€IˆtÓØ€GˆTÓØ€IˆtÓØ€FˆDÓæØÓð %*ØEIñ	àð	ð 8ð		ð
 #ð	ð "ð	ð #Cð	ð ð	ð
õ	ð	$à"ð	$ð 6ð	$ð  ;ð		$ð
 ô	$ð	à"ð	ð 6ð	ð  ;ð		ð
 ô	ð 
×"Ñ"ó$ó #ð$ð ó#ó ð#ð ó!ó ð!ðF óó ðð óó ðð ðà1ðð ðð 
ó	ó ðð$ ð 7:Ø Ø*-Ø#Ø$Ø!ØØ*-ØADØ"'ØØ:=Ø,/Ø Ø #Ø"Ø"'ñ'ð 4ðð ð	ð
 (ðð ðð ðð ðð ðð %(ðð ?ðð  ðð ðð 8ðð *ðð  ð!ð" ð#ð$ ð%ð&  ð'ð( ð)ð* 
ô+ó ðð. Û8ó Ø8àótó ðt÷l	'r`   r±  c                  óD   • \ rS rSr% SrS\S'   S	S jr      S	S jrSrg)
ÚSchemaEventTargeti|  z’Base class for elements that are the targets of :class:`.DDLEvents`
events.

This includes :class:`.SchemaItem` as well as :class:`.SchemaType`.

zdispatcher[SchemaEventTarget]Údispatchc                ó   • g)z0Associate with this SchemaEvent's parent object.Nra   ©r\   Úparentr®   s      r]   Ú_set_parentÚSchemaEventTarget._set_parent†  s   � r`   c                ó–   • U R                   R                  X5        U R                  " U40 UD6  U R                   R                  X5        g rx   )rš  Úbefore_parent_attachrž  Úafter_parent_attachrœ  s      r]   Ú_set_parent_with_dispatchÚ+SchemaEventTarget._set_parent_with_dispatch‰  s;   € ð 	�‰×*Ñ*¨4Ô8Ø×Ò˜Ñ& 2Ò&Ø�‰×)Ñ)¨$Õ7r`   ra   N)r�  r™  r®   r   r   rµ   )	rb   rc   rd   re   r¶   r€   rž  r£  rg   ra   r`   r]   r™  r™  |  s1   ‡ ñð ,Ó+ô?ð8Ø'ð8Ø/2ð8à	÷8r`   r™  c                  ó   • \ rS rSrSrSrg)ÚSchemaVisitablei‘  zbBase class for elements that are targets of a :class:`.SchemaVisitor`.

.. versionadded:: 2.0.41

ra   N)rb   rc   rd   re   r¶   rg   ra   r`   r]   r¦  r¦  ‘  s   † ôr`   r¦  c                  ó,   • \ rS rSr% SrSS0rS\S'   Srg)	ÚSchemaVisitori™  zXDefine the visiting for ``SchemaItem`` and more
generally ``SchemaVisitable`` objects.

Úschema_visitorTr�  Ú__traverse_options__ra   N)rb   rc   rd   re   r¶   rª  r€   rg   ra   r`   r]   r¨  r¨  ™  s   ‡ ñð
 -=¸dÐ+CÐ˜.ÖCr`   r¨  c                  ó0   • \ rS rSrSrSrSrSrSrSr	Sr
S	rg
)Ú _SentinelDefaultCharacterizationi¢  ÚnoneÚunknownÚ
clientsideÚsentinel_defaultÚ
serversideÚidentityÚsequencera   N)rb   rc   rd   re   ÚNONEÚUNKNOWNÚ
CLIENTSIDEÚSENTINEL_DEFAULTÚ
SERVERSIDEÚIDENTITYÚSEQUENCErg   ra   r`   r]   r¬  r¬  ¢  s&   † Ø€DØ€GØ€JØ)ÐØ€JØ€HØƒHr`   r¬  c                  ób   • \ rS rSr% SrS\S'   SrS\S'   SrS\S'   \R                  r
S	\S
'   Srg)Ú_SentinelColumnCharacterizationi¬  NzOptional[Sequence[Column[Any]]]ÚcolumnsFr�   Úis_explicitÚ
is_autoincr¬  Údefault_characterizationra   )rb   rc   rd   re   r½  r€   r¾  r¿  r¬  r´  rÀ  rg   ra   r`   r]   r¼  r¼  ¬  s7   ‡ Ø/3€GÐ,Ó3Ø€K�ÓØ€J�Óà(×-Ñ-ð Ð>ö r`   r¼  Ú_COLKEYÚ_COL_coúColumnElement[Any]T)rn   Ú	covariantÚ_COLc                  ó`   • \ rS rSr% SrS\S'         S
S jrSS jrSS jr    SS jr	Sr
g	)Ú_ColumnMetricsi»  )ÚcolumnrÂ  rÈ  c                ó„   • X l         UR                  nU(       a'  UR                   H  nX4   R                  U 5        M     g g rx   )rÈ  Ú_proxy_indexÚ_expanded_proxy_setÚadd)r\   Ú
collectionÚcolÚpiÚeps_cols        r]   rÆ   Ú_ColumnMetrics.__init__À  s<   € ð Œð ×$Ñ$ˆÞØ×2Ô2�Ø‘—‘ Ö%ò 3ð r`   c                ó.   • U R                   R                  $ rx   )rÈ  rË  r[   s    r]   Úget_expanded_proxy_setÚ%_ColumnMetrics.get_expanded_proxy_setÌ  s   € Ø�{‰{×.Ñ.Ð.r`   c                óÚ   • UR                   nU(       d  g U R                  R                   H=  nUR                  US 5      nU(       a  UR	                  U 5        Uc  M2  U(       a  M;  X#	 M?     g rx   )rÊ  rÈ  rË  rí   Údiscard)r\   rÍ  rÏ  rÎ  Úcolsets        r]   ÚdisposeÚ_ColumnMetrics.disposeÏ  sU   € Ø×$Ñ$ˆÞØØ—;‘;×2Ô2ˆCØ—V‘V˜C Ó&ˆFÞØ—‘˜tÔ$ØÓ!¯&¨&Ø’Gò 3r`   c                ó¤   • U R                   R                  nUR                  U5       H%  nUR                  [	        U/5      5      (       a  M%    g   grô  )rÈ  rË  rÐ  r  r   )r\   Ú
target_setÚexpanded_proxy_setÚts       r]   ÚembeddedÚ_ColumnMetrics.embeddedÚ  sJ   € ð "Ÿ[™[×<Ñ<ÐØ×&Ñ&Ð'9Ö:ˆAØ%×2Ñ2´>À1À#Ó3F×GÓGÙñ ;ð r`   N)rÍ  zColumnCollection[Any, _COL_co]rÎ  rÂ  r   rµ   rË   )rÍ  ú"ColumnCollection[_COLKEY, _COL_co]r   rµ   )rÛ  z=Union[Set[ColumnElement[Any]], FrozenSet[ColumnElement[Any]]]r   r�   )rb   rc   rd   re   r·   r€   rÆ   rÓ  rØ  rÞ  rg   ra   r`   r]   rÇ  rÇ  »  sL   ‡ Ø€IàƒOð
&Ø8ð
&Ø?Fð
&à	ô
&ô/ô	ð
ð
ð
ð
 
÷
r`   rÇ  c                  ó†  • \ rS rSr% SrSrS\S'   S\S'   S\S	'   S
\S'    S5 S6S jjr\R                  " S5      S7S j5       r
    S8S jr\S9S j5       rS:S jrS9S jrS;S jrS<S jrS=S jrS>S jr\S?S j5       r\    S@S j5       r\    SAS j5       r    SBS jrSCS jrSDS jrSES jrSFS jr\S5SGS  jj5       r\SHS! j5       r S5     SIS" jjrSJS# jrSKS$ jrSLS% jrSMS& jrSNS' jrSOS( jr SPS) jr!Sr"S*\S+'       S8S, jr# S5     SQS- jjr$SRS. jr%SSS/ jr&STS0 jr'SUS1 jr(SVS2 jr) SW     SXS3 jjr*S4r+g)YÚColumnCollectioniç  ao  Collection of :class:`_expression.ColumnElement` instances,
typically for
:class:`_sql.FromClause` objects.

The :class:`_sql.ColumnCollection` object is most commonly available
as the :attr:`_schema.Table.c` or :attr:`_schema.Table.columns` collection
on the :class:`_schema.Table` object, introduced at
:ref:`metadata_tables_and_columns`.

The :class:`_expression.ColumnCollection` has both mapping- and sequence-
like behaviors. A :class:`_expression.ColumnCollection` usually stores
:class:`_schema.Column` objects, which are then accessible both via mapping
style access as well as attribute access style.

To access :class:`_schema.Column` objects using ordinary attribute-style
access, specify the name like any other object attribute, such as below
a column named ``employee_name`` is accessed::

    >>> employee_table.c.employee_name

To access columns that have names with special characters or spaces,
index-style access is used, such as below which illustrates a column named
``employee ' payment`` is accessed::

    >>> employee_table.c["employee ' payment"]

As the :class:`_sql.ColumnCollection` object provides a Python dictionary
interface, common dictionary method names like
:meth:`_sql.ColumnCollection.keys`, :meth:`_sql.ColumnCollection.values`,
and :meth:`_sql.ColumnCollection.items` are available, which means that
database columns that are keyed under these names also need to use indexed
access::

    >>> employee_table.c["values"]


The name for which a :class:`_schema.Column` would be present is normally
that of the :paramref:`_schema.Column.key` parameter.  In some contexts,
such as a :class:`_sql.Select` object that uses a label style set
using the :meth:`_sql.Select.set_label_style` method, a column of a certain
key may instead be represented under a particular label name such
as ``tablename_columnname``::

    >>> from sqlalchemy import select, column, table
    >>> from sqlalchemy import LABEL_STYLE_TABLENAME_PLUS_COL
    >>> t = table("t", column("c"))
    >>> stmt = select(t).set_label_style(LABEL_STYLE_TABLENAME_PLUS_COL)
    >>> subq = stmt.subquery()
    >>> subq.c.t_c
    <sqlalchemy.sql.elements.ColumnClause at 0x7f59dcf04fa0; t_c>

:class:`.ColumnCollection` also indexes the columns in order and allows
them to be accessible by their integer position::

    >>> cc[0]
    Column('x', Integer(), table=None)
    >>> cc[1]
    Column('y', Integer(), table=None)

.. versionadded:: 1.4 :class:`_expression.ColumnCollection`
   allows integer-based
   index access to the collection.

Iterating the collection yields the column expressions in order::

    >>> list(cc)
    [Column('x', Integer(), table=None),
     Column('y', Integer(), table=None)]

The base :class:`_expression.ColumnCollection` object can store
duplicates, which can
mean either two columns with the same key, in which case the column
returned by key  access is **arbitrary**::

    >>> x1, x2 = Column("x", Integer), Column("x", Integer)
    >>> cc = ColumnCollection(columns=[(x1.name, x1), (x2.name, x2)])
    >>> list(cc)
    [Column('x', Integer(), table=None),
     Column('x', Integer(), table=None)]
    >>> cc["x"] is x1
    False
    >>> cc["x"] is x2
    True

Or it can also mean the same column multiple times.   These cases are
supported as :class:`_expression.ColumnCollection`
is used to represent the columns in
a SELECT statement which may include duplicates.

A special subclass :class:`.DedupeColumnCollection` exists which instead
maintains SQLAlchemy's older behavior of not allowing duplicates; this
collection is used for schema level objects like :class:`_schema.Table`
and
:class:`.PrimaryKeyConstraint` where this deduping is helpful.  The
:class:`.DedupeColumnCollection` class also has additional mutation methods
as the schema constructs have more use cases that require removal and
replacement of columns.

.. versionchanged:: 1.4 :class:`_expression.ColumnCollection`
   now stores duplicate
   column keys as well as the same column in multiple positions.  The
   :class:`.DedupeColumnCollection` class is added to maintain the
   former behavior in those cases where deduplication as well as
   additional replace/remove operations are needed.


)Ú_collectionÚ_indexÚ_colsetrÊ  z6List[Tuple[_COLKEY, _COL_co, _ColumnMetrics[_COL_co]]]rã  z4Dict[Union[None, str, int], Tuple[_COLKEY, _COL_co]]rä  z6Dict[ColumnElement[Any], Set[_ColumnMetrics[_COL_co]]]rÊ  zSet[_COL_co]rå  Nc                óB  • [         R                  U S[        5       5        [         R                  U S0 5        [         R                  U S[        R                  " [
        R                  5      5        [         R                  U S/ 5        U(       a  U R                  U5        g g )Nrå  rä  rÊ  rã  )rÅ   rÚ  r  ÚcollectionsÚdefaultdictr+   Ú
OrderedSetÚ_initial_populate)r\   r½  s     r]   rÆ   ÚColumnCollection.__init__[  sx   € ô 	×Ñ˜4 ¬C«EÔ2Ü×Ñ˜4 ¨2Ô.Ü×ÑØ�.¤+×"9Ò"9¼$¿/¹/Ó"Jô	
ô 	×Ñ˜4 °Ô3ÞØ×"Ñ" 7Õ+ð r`   zsqlalchemy.sql.elementsc                óŒ   • [         R                  R                  nUR                  " U R                  [
        R                  SS.6$ )NF)Ú_literal_as_text_roler…  )r+   r[  Úsql_elementsr=   Ú_all_columnsr   ÚColumnsClauseRole©r\   r5   s     r]   Ú__clause_element__Ú#ColumnCollection.__clause_element__g  s=   € ä—>‘>×.Ñ.ˆà×"Ò"ð ×Ñô #(×"9Ñ"9Øò
ð 	
r`   c                ó&   • U R                  U5        g rx   ©Ú_populate_separate_keys©r\   Úiter_s     r]   rê  Ú"ColumnCollection._initial_populateq  s   € ð 	×$Ñ$ UÕ+r`   c                óP   • U R                    VVs/ s H  u  poPM	     snn$ s  snnf rx   ©rã  ©r\   r  rÎ  s      r]   rï  ÚColumnCollection._all_columnsv  s&   € à'+×'7Ò'7Ô8Ò'7™˜ ’Ñ'7Ò8Ð8ùÓ8ó   �"c                óR   • U R                    VVs/ s H  u  n  o!PM
     snn$ s  snnf )zIReturn a sequence of string key names for all columns in this
collection.rû  )r\   r‡  r  s      r]   ÚkeysÚColumnCollection.keysz  s*   € ð $(×#3Ò#3Ô4Ò#3‘i�q˜!˜Q’Ñ#3Ò4Ð4ùÓ4s   �#c                óP   • U R                    VVs/ s H  u  poPM	     snn$ s  snnf )zvReturn a sequence of :class:`_sql.ColumnClause` or
:class:`_schema.Column` objects for all columns in this
collection.rû  rü  s      r]   r6  ÚColumnCollection.values  s(   € ð (,×'7Ò'7Ô8Ò'7™˜ ’Ñ'7Ò8Ð8ùÓ8rþ  c                óZ   • U R                    VVVs/ s H	  u  po1U4PM     snnn$ s  snnnf )z¶Return a sequence of (key, column) tuples for all columns in this
collection each consisting of a string key name and a
:class:`_sql.ColumnClause` or
:class:`_schema.Column` object.
rû  )r\   r‡  rÎ  r  s       r]   rº  ÚColumnCollection.items…  s*   € ð -1×,<Ò,<Õ=Ò,<™[˜a a�C“Ñ,<Ó=Ð=ùÔ=s   ‘&c                ó,   • [        U R                  5      $ rx   )r�   rã  r[   s    r]   Ú__bool__ÚColumnCollection.__bool__Ž  s   € Ü�D×$Ñ$Ó%Ð%r`   c                ó,   • [        U R                  5      $ rx   )r0  rã  r[   s    r]   r7  ÚColumnCollection.__len__‘  s   € Ü�4×#Ñ#Ó$Ð$r`   c           	     ób   • [        U R                   VVs/ s H  u  poPM	     snn5      $ s  snnf rx   )rP  rã  rü  s      r]   r>  ÚColumnCollection.__iter__”  s+   € ä¨$×*:Ò*:Ô;Ò*:™Y˜Q Q’SÑ*:Ò;Ó<Ð<ùÓ;s   •+
c                ó   • g rx   ra   rˆ   s     r]   r$  ÚColumnCollection.__getitem__˜  s   € Ø<?r`   c                ó   • g rx   ra   rˆ   s     r]   r$  r  ›  ó   € ð 69r`   c                ó   • g rx   ra   rˆ   s     r]   r$  r     r  r`   c                óž  ^ •  [        U[        [        45      (       aQ  [        U[        5      (       a  S T R                  U    5       nOU 4S jU 5       n[	        U5      R                  5       $ T R                  U   S   $ ! [         aA  n[        UR                  S   [        5      (       a  [        UR                  S   5      Uee S nAff = f)Nc              3  ó.   #   • U  H  u  pnX4v •  M     g 7frx   ra   )r2  Úsub_keyrÎ  r  s       r]   r3  Ú/ColumnCollection.__getitem__.<locals>.<genexpr>«  s   é € ð â1FÑ-˜W¨1ð !�Ú1Fùs   ‚c              3  óB   >#   • U  H  nTR                   U   v •  M     g 7frx   ©rä  )r2  r  r\   s     €r]   r3  r  °  s   øé € ÐDÂ°W˜DŸK™K¨Ö0Âùs   ƒr   r   )r  ré  Úslicerã  râ  Úas_readonlyrä  r  râ   rE  Ú
IndexError)r\   r‰   Úcolsr  s   `   r]   r$  r  ¥  s²   ø€ ð	Ü˜#¤¤u˜~×.Ñ.Ü˜c¤5×)Ñ)ñà15×1AÑ1AÀ#Ò1Fó‘Dô
 EÁÓD�Dä'¨Ó-×9Ñ9Ó;Ð;à—{‘{ 3Ñ'¨Ñ*Ð*øÜó 	Ü˜#Ÿ(™( 1™+¤s×+Ñ+Ü  §¡¨!¡Ó-°3Ð6àûð		ús   ƒA+B Á/B Â
CÂ<CÃCc                ód   •  U R                   U   S   $ ! [         a  n[        U5      UeS nAff = f)Nr   )rä  r  ÚAttributeError)r\   r‰   r  s      r]   rŠ   ÚColumnCollection.__getattr__»  s8   € ð	/Ø—;‘;˜sÑ# AÑ&Ð&øÜó 	/Ü  Ó%¨3Ð.ûð	/ús   ‚ ”
/ž*ª/c                óz   • XR                   ;  a,  [        U[        5      (       d  [        R                  " S5      egg)Nz'__contains__ requires a string argumentFT)rä  r  rŒ   r*   r'  rˆ   s     r]   Ú__contains__ÚColumnCollection.__contains__Á  s7   € Ø—k‘kÓ!Ü˜c¤3×'Ñ'Ü×'Ò'Ø=óð ð àr`   c                ó8   • [        X5       H  u  p#X#Ld  M    g   g)z\Compare this :class:`_expression.ColumnCollection` to another
based on the names of the keysFTr   )r\   rÒ  ÚlÚrs       r]   ÚcompareÚColumnCollection.compareË  s"   € ô   Ö,‰DˆAØŒzÙñ -ð r`   c                ó$   • U R                  U5      $ rx   )r%  )r\   rÒ  s     r]   rö  ÚColumnCollection.__eq__Õ  s   € Ø�|‰|˜EÓ"Ð"r`   c                ó   • g rx   ra   ©r\   r‰   r|   s      r]   rí   ÚColumnCollection.getØ  s   € ØHKr`   c                ó   • g rx   ra   r*  s      r]   rí   r+  Û  s   € ØDGr`   c                óH   • XR                   ;   a  U R                   U   S   $ U$ )zŽGet a :class:`_sql.ColumnClause` or :class:`_schema.Column` object
based on a string key name from this
:class:`_expression.ColumnCollection`.r   r  r*  s      r]   rí   r+  Þ  s'   € ð —+‘+ÓØ—;‘;˜sÑ# AÑ&Ð&àˆNr`   c                ój   • U R                   R                  < SSR                  S U  5       5      < S3$ )Nrù  rú  c              3  ó8   #   • U  H  n[        U5      v •  M     g 7frx   )rŒ   )r2  rÖ   s     r]   r3  Ú+ColumnCollection.__str__.<locals>.<genexpr>í  s   é € Ð+¢d ”c˜!—f�f¢dùs   ‚rÿ  )rî   rb   r   r[   s    r]   Ú__str__ÚColumnCollection.__str__ê  s+   € à�N‰N×#Ô#Ø�I‰IÑ+¡dÓ+Ö+ð
ð 	
r`   c                ó   • [        5       erx   r¡   rV  s      r]   r)  ÚColumnCollection.__setitem__ð  ó   € Ü!Ó#Ð#r`   c                ó   • [        5       erx   r¡   rˆ   s     r]   r,  ÚColumnCollection.__delitem__ó  r5  r`   c                ó   • [        5       erx   r¡   )r\   r‰   rÈ   s      r]   rÚ  ÚColumnCollection.__setattr__ö  r5  r`   c                ó   • [        5       e)zIDictionary clear() is not implemented for
:class:`_sql.ColumnCollection`.r¡   r[   s    r]   ÚclearÚColumnCollection.clearù  ó   € ô "Ó#Ð#r`   c                ó   • [        5       erx   r¡   )r\   rÈ  s     r]   ÚremoveÚColumnCollection.removeþ  r5  r`   c                ó   • [        5       e)zJDictionary update() is not implemented for
:class:`_sql.ColumnCollection`.r¡   r÷  s     r]   rx  ÚColumnCollection.update  r=  r`   zOptional[int]Ú__hash__c                óÒ  • U VVs/ s H  u  p#X#[        X5      4PM     snn=U R                  SS& nU R                  R                  S U 5       5        U R                  R                  [        U5       VVVVs0 s H  u  nu  p#oeX#4_M     snnnn5        U R                  R                  [        U5       VVVs0 s H	  u  p'obX'4_M     snnn5        gs  snnf s  snnnnf s  snnnf )ú*populate from an iterator of (key, column)Nc              3  óF   #   • U  H  u  poR                  5       v •  M     g 7frx   ©Ú_deannotate)r2  r  rÖ   s      r]   r3  Ú;ColumnCollection._populate_separate_keys.<locals>.<genexpr>  s   é € ÐFº:±°°aŸM™MŸO˜Oº:ùó   ‚!)rÇ  rã  rå  rx  rä  Ú	enumeratery  )r\   rø  r‡  rÖ   rÍ  Úidxr  rÎ  s           r]   rö  Ú(ColumnCollection._populate_separate_keys	  sÌ   € ñ 9>ô,
Ú8=±°ˆQ”> $Ó*Ó+¹ò,
ð 	
ˆ×Ñ™Ð˜jð 	�‰×ÑÑF¹:ÓFÔFØ�‰×ÑÜ/8¸Ô/DÖEÒ/D™^˜S¡) 1¨�1�&Š[Ñ/DÔEô	
ð 	�‰×Ñ¼À*Ô9MÕNÒ9M©I¨A°A ˜xšKÑ9MÓNÕOùó,
ùõ
 FùäNs   †CÁ9CÂ:C"c                óp  • Uc  UR                   nOUn[        U R                  5      n[        [        U5      nU R                  R                  X5[        X5      45        U R                  R                  UR                  5       5        X54U R                  U'   X0R                  ;  a  X54U R                  U'   gg)a�  Add a column to this :class:`_sql.ColumnCollection`.

.. note::

    This method is **not normally used by user-facing code**, as the
    :class:`_sql.ColumnCollection` is usually part of an existing
    object such as a :class:`_schema.Table`. To add a
    :class:`_schema.Column` to an existing :class:`_schema.Table`
    object, use the :meth:`_schema.Table.append_column` method.

N)r‰   r0  rã  r	   rÂ  ÚappendrÇ  rå  rÌ  rH  rä  )r\   rÈ  r‰   Úcolkeyr#  Ú_columns         r]   rÌ  ÚColumnCollection.add  s£   € ð  ‰;Ø—Z‘Z‰FàˆFä�× Ñ Ó!ˆô
 ”w Ó'ˆà×Ñ×ÑØœn¨TÓ;Ð<ô	
ð 	�‰×Ñ˜×,Ñ,Ó.Ô/Ø Ð*ˆ�‰�A‰ØŸ™Ó$Ø#)Ð"3ˆD�K‰K˜Òð %r`   c                ót   • U R                    VVVs/ s H	  u  po1U4PM     snnnU R                  S.$ s  snnnf )N©rã  rä  rT  )r\   r‡  rÖ   r  s       r]   Ú__getstate__ÚColumnCollection.__getstate__;  s6   € à26×2BÒ2BÕCÒ2B¡w q¨Q ›FÑ2BÓCØ—k‘kñ
ð 	
ùÜCs   ‘3c                ó¨  • [         R                  U SUS   5        [         R                  U S[        R                  " [        R
                  5      5        [         R                  U SUS    VVs/ s H  u  p#X#[        X5      4PM     snn5        [         R                  U SU R                   VVVs1 s H  u  p$oTiM	     snnn5        g s  snnf s  snnnf )Nrä  rÊ  rã  rå  )rÅ   rÚ  rç  rè  r+   ré  rÇ  rã  )r\   Ústater‡  rÖ   rÎ  r  s         r]   Ú__setstate__ÚColumnCollection.__setstate__A  s½   € Ü×Ñ˜4 ¨5°©?Ô;Ü×ÑØ�.¤+×"9Ò"9¼$¿/¹/Ó"Jô	
ô 	×ÑØØð $ MÒ2ôâ2‘F�Qð ”~ dÓ.Ó/Ù2òô	
ô 	×ÑØ�)°4×3CÒ3CÕDÒ3C¡i a¨ašcÑ3CÓDõ	
ùóùô Es   Á-CÂ/Cc                óz   • XR                   ;  a,  [        U[        5      (       a  [        R                  " S5      egg)z3Checks if a column object exists in this collectionzZcontains_column cannot be used with string arguments. Use ``col_name in table.c`` instead.FT)rå  r  rŒ   r*   r'  ©r\   rÎ  s     r]   Úcontains_columnÚ ColumnCollection.contains_columnR  s9   € à—l‘lÓ"Ü˜#œs×#Ñ#Ü×'Ò'ð;óð ð àr`   c                ó   • [        U 5      $ )zAReturn a "read only" form of this
:class:`_sql.ColumnCollection`.)ÚReadOnlyColumnCollectionr[   s    r]   r  ÚColumnCollection.as_readonly^  s   € ô (¨Ó-Ð-r`   c                ó¼   • U R                   nU(       a  gU R                   H8  u    p#UR                  R                  nU H  nX   R	                  U5        M     M:     g)a‰  populate the "proxy index", if empty.

proxy index is added in 2.0 to provide more efficient operation
for the corresponding_column() method.

For reasons of both time to construct new .c collections as well as
memory conservation for large numbers of large .c collections, the
proxy_index is only filled if corresponding_column() is called. once
filled it stays that way, and new _ColumnMetrics objects created after
that point will populate it with new data. Note this case would be
unusual, if not nonexistent, as it means a .c collection is being
mutated after corresponding_column() were used, however it is tested in
test/base/test_utils.py.

N)rÊ  rã  rÈ  rË  rÌ  )r\   rÏ  r  ÚmetricsÚepsrÐ  s         r]   Ú_init_proxy_indexÚ"ColumnCollection._init_proxy_indexd  sP   € ð  ×ÑˆÞØà!×-Ô-‰MˆAˆqØ—.‘.×4Ñ4ˆCã�Ø‘—‘ Ö(ó ò .r`   c           
     óÔ  ^• XR                   ;   a  U$ Su  p4UR                  nU R                  mT(       d  U R                  5         U4S jU 5        GHt  nU(       a  UR	                  U5      (       d  M#  Uc  UnM*  UR                  UR                  R                  5      nUc%  UR                  UR                  R                  5      n[        U5      [        U5      :”  a  UnUnM•  Xs:X  d  Mœ  [        UR                  R                  5        Vs/ s H7  nUR                  U5      (       d  M  UR                  R                  SS5      PM9     sn5      n	[        UR                  R                  5        Vs/ s H7  nUR                  U5      (       d  M  UR                  R                  SS5      PM9     sn5      n
X©:  d  GMp  UnUnGMw     U(       a  UR                  $ S$ s  snf s  snf )a*  Given a :class:`_expression.ColumnElement`, return the exported
:class:`_expression.ColumnElement` object from this
:class:`_expression.ColumnCollection`
which corresponds to that original :class:`_expression.ColumnElement`
via a common
ancestor column.

:param column: the target :class:`_expression.ColumnElement`
              to be matched.

:param require_embedded: only return corresponding columns for
 the given :class:`_expression.ColumnElement`, if the given
 :class:`_expression.ColumnElement`
 is actually present within a sub-element
 of this :class:`_expression.Selectable`.
 Normally the column will match if
 it merely shares a common ancestor with one of the exported
 columns of this :class:`_expression.Selectable`.

.. seealso::

    :meth:`_expression.Selectable.corresponding_column`
    - invokes this method
    against the collection returned by
    :attr:`_expression.Selectable.exported_columns`.

.. versionchanged:: 1.4 the implementation for ``corresponding_column``
   was moved onto the :class:`_expression.ColumnCollection` itself.

)NNc              3  óN   >#   • U  H  oT;   d  M
  TU     H  o"v •  M     M     g 7frx   ra   )r2  ÚtsÚmmrÏ  s      €r]   r3  Ú8ColumnCollection.corresponding_column.<locals>.<genexpr>¬  s&   øé € ð  
Ú#�2¨R¡x‹B¸"¸R½&°BŒB¹&‰Bšùs   ƒ	%�%NÚweightr   )rå  rÁ   rÊ  re  rÞ  r  rÈ  rË  r0  r5  Ú_uncached_proxy_listÚshares_lineager<  rí   )r\   rÈ  Úrequire_embeddedÚselected_intersectionÚselected_metricsrÛ  Úcurrent_metricsÚcurrent_intersectionÚscÚselected_col_distanceÚcurrent_col_distancerÏ  s              @r]   Úcorresponding_columnÚ%ColumnCollection.corresponding_column~  sç  ø€ ðH —\‘\Ó!ØˆMà2<Ñ/ÐØ×%Ñ%ˆ
à×ÑˆÞØ×"Ñ"Ô$ô 
Ù#÷ 
ˆOö $ ×'?Ñ'?À
×'KÓ'KØ#Ñ+à'6Ð$Ùà'1×'>Ñ'>Ø#×*Ñ*×>Ñ>ó(Ð$ð )Ñ0Ø,6×,CÑ,CØ(×/Ñ/×CÑCó-Ð)ô Ð+Ó,¬sÐ3HÓ/IÓIð (7Ð$Ø,@Ò)Ø)ÕBô -0ð !1× 7Ñ 7× LÑ LÔ Nóò !Oð !#ð  "×0Ñ0°×8ó	 =˜BŸO™O×/Ñ/°¸!Ö<á Nñó-Ð)ô ,/ð !0× 6Ñ 6× KÑ KÔ Móò !Nð !#ð  "×0Ñ0°×8ó	 =˜BŸO™O×/Ñ/°¸!Ö<á Mñó,Ð(ð ,ÖCØ+:Ð(Ø0DÓ-ñq 
öt +;Ð×&Ñ&ÐDÀÐDùò+ùòs   ÄG 
Ä- G 
Å5G%
Æ G%
ra   rx   )r½  z+Optional[Iterable[Tuple[_COLKEY, _COL_co]]])r   r=   )rø  z!Iterable[Tuple[_COLKEY, _COL_co]]r   rµ   )r   zList[_COL_co])r   zList[_COLKEY])r   zList[Tuple[_COLKEY, _COL_co]])r   r�   rD  )r   zIterator[_COL_co])r‰   zUnion[str, int]r   rÂ  )r‰   zTuple[Union[str, int], ...]r   ú*ReadOnlyColumnCollection[_COLKEY, _COL_co])r‰   r  r   ry  )r‰   z3Union[str, int, slice, Tuple[Union[str, int], ...]]r   z:Union[ReadOnlyColumnCollection[_COLKEY, _COL_co], _COL_co])r‰   rŒ   r   rÂ  )r‰   rŒ   r   r�   )rÒ  rà  r   r�   )rÒ  r   r   r�   )r‰   rŒ   r|   rµ   r   zOptional[_COL_co])r‰   rŒ   r|   rÅ  r   zUnion[_COL_co, _COL])r‰   rŒ   r|   zOptional[_COL]r   zOptional[Union[_COL_co, _COL]]r'  )r‰   rŒ   r(  r   r   r   )r‰   rŒ   r   r   )r‰   rŒ   rÈ   r   r   r   )r   r   )rÈ  r   r   r   )rø  r   r   r   )rÈ  rÃ  r‰   zOptional[_COLKEY]r   rµ   )r   r�  ©rX  r�  r   rµ   )rÎ  rÃ  r   r�   )r   ry  rÌ   )F)rÈ  rÅ  ro  r�   r   zOptional[Union[_COL, _COL_co]]),rb   rc   rd   re   r¶   r·   r€   rÆ   r+   Úpreload_modulerò  rê  r�  rï  r   r6  rº  r  r7  r>  r   r$  rŠ   r   r%  rö  rí   r1  r)  r,  rÚ  r;  r?  rx  rC  rö  rÌ  rU  rY  r]  r  re  rw  rg   ra   r`   r]   râ  râ  ç  s  ‡ ñjðX E€IàGÓGØ@Ó@ØHÓHØÓð FJð
,ØBõ
,ð 
×ÒÐ2Ó3ó
ó 4ð
ð,Ø6ð,à	ô,ð
 ó9ó ð9ô5ô
9ô>ô&ô%ô=ð Û?ó Ø?àð9Ø.ð9à	3ó9ó ð9ð ð9Øð9à	3ó9ó ð9ðØFðà	Côô,/ôôô#ð ÝKó ØKàÛGó ØGð 37ð
Øð
Ø!/ð
à	'õ
ô
ô$ô$ô$ô$ô
$ô$ð #€HˆmÓ"ðPØ6ðPà	ôPð DHð"4Ø(ð"4Ø/@ð"4à	õ"4ôH
ô
ô"
ô.ô)ð6 6;ðhEØðhEØ.2ðhEà	'÷hEð hEr`   râ  Ú	_NAMEDCOLzNamedColumn[Any]c                  ó|   • \ rS rSrSr S     SS jjrSS jr    SS jrSS jrSS jr	 S     SS	 jjr
S
rg)ÚDedupeColumnCollectioniì  aY  A :class:`_expression.ColumnCollection`
that maintains deduplicating behavior.

This is useful by schema level objects such as :class:`_schema.Table` and
:class:`.PrimaryKeyConstraint`.    The collection includes more
sophisticated mutator methods as well to suit schema objects which
require mutable column collections.

.. versionadded:: 1.4

Nc                ór  • Ub&  UR                   U:w  a  [        R                  " S5      eUR                   nUc  [        R                  " S5      eX R                  ;   aI  U R                  U   S   nX1L a  g U R	                  U5        [
        R                  R                  US5        g U R                  X!5        g )NúKDedupeColumnCollection requires columns be under the same key as their .keyz-Can't add unnamed column to column collectionr   rÁ   )	r‰   r*   r'  rä  Úreplacer+   r�  ÚresetÚ_append_new_column)r\   rÈ  r‰   Úexistings       r]   rÌ  ÚDedupeColumnCollection.addù  s¬   € ð ‰?˜vŸz™z¨SÓ0Ü×#Ò#ð-óð ð �j‰jˆà‰;Ü×#Ò#Ø?óð ð —+‘+ÓØ—{‘{ 3Ñ'¨Ñ*ˆHàÒ!Øà�L‰L˜Ô ô
 ×"Ñ"×(Ñ(¨°Õ=à×#Ñ# CÕ0r`   c                ó  • [        U R                  5      nU R                  R                  X[        X5      45        U R                  R                  UR                  5       5        X4U R                  U'   X4U R                  U'   g rx   )r0  rã  rO  rÇ  rå  rÌ  rH  rä  )r\   r‰   Únamed_columnr#  s       r]   rƒ  Ú)DedupeColumnCollection._append_new_column  sq   € Ü�× Ñ Ó!ˆØ×Ñ×ÑØ¤¨tÓ BÐCô	
ð 	�‰×Ñ˜×1Ñ1Ó3Ô4ØÐ,ˆ�‰�A‰ØÐ.ˆ�‰�CÒr`   c           	     óÊ  • [        U5      n/ nU HÕ  u  pEUR                  U:w  a  [        R                  " S5      eUR                  U R
                  ;   a-  UR                  UR                  :w  a  UR                  U5        Mr  UR                  U R
                  ;   a  UR                  U5        MŸ  XE4U R
                  U'   U R                  R                  XE[        X5      45        M×     U R                  R                  S U R                   5       5        U R
                  R                  S [        U R                  5       5       5        U H  nU R                  U5        M     g)rE  r€  c              3  óF   #   • U  H  u  po2R                  5       v •  M     g 7frx   rG  )r2  r‡  rÖ   r  s       r]   r3  ÚADedupeColumnCollection._populate_separate_keys.<locals>.<genexpr>4  s   é € ÐNÒ=M±	°°qŸM™MŸO˜OÒ=MùrJ  c              3  ó6   #   • U  H  u  nu  p#oAX#44v •  M     g 7frx   ra   )r2  rL  r‡  rÖ   r  s        r]   r3  r‹  6  s    é € ð 
Ú0K™n˜c¡9 A¨!�1�&�MÒ0Kùs   ‚N)Úlistr‰   r*   r'  rZ   rä  rO  rã  rÇ  rå  rx  rK  r�  )r\   rø  r  Úreplace_colr‡  rÎ  s         r]   rö  Ú.DedupeColumnCollection._populate_separate_keys   s  € ô �E‹{ˆàˆÛ‰FˆAØ�w‰w˜!‹|Ü×'Ò'ð1óð ð �x‰x˜4Ÿ;™;Ó&¨3¯7©7°c·h±hÓ+>Ø×"Ñ" 3Ö'Ø—‘˜DŸK™KÓ'Ø×"Ñ" 3Ö'à"# �—‘˜A‘Ø× Ñ ×'Ñ'¨´ÀÓ1JÐ(KÖLñ ð 	�‰×ÑÑN¸T×=MÒ=MÓNÔNà�‰×Ññ 
Ü09¸$×:JÑ:JÔ0Kó
ô 	
ó ˆCØ�L‰L˜Öò r`   c                ó4   • U R                  S U 5       5        g )Nc              3  ó<   #   • U  H  oR                   U4v •  M     g 7frx   )r‰   )r2  rÎ  s     r]   r3  Ú0DedupeColumnCollection.extend.<locals>.<genexpr>=  s   é € Ð$Eºu¸§g¡g¨s¥^ºuùs   ‚rõ  r÷  s     r]   ÚextendÚDedupeColumnCollection.extend<  s   € Ø×$Ñ$Ñ$E¹uÓ$EÕEr`   c                ór  • XR                   ;  a  [        SU-  5      eU R                  UR                  	 U R                   R	                  U5        U R
                   VVVs/ s H  u  p#nX1Ld  M  X#U4PM     snnnU R
                  S S & U R                  R                  US5       H  nUR                  U 5        M     U R                  R                  [        U R
                  5       VVVVs0 s H  u  nu  p&ouX&4_M     snnnn5        U R                  [        U R
                  5      	 g s  snnnf s  snnnnf )Nz8Can't remove column %r; column is not in this collectionra   )rå  r  rä  r‰   r?  rã  rÊ  rí   rØ  rx  rK  r0  )r\   rÈ  r‡  rÖ   rc  rL  rÎ  r  s           r]   r?  ÚDedupeColumnCollection.remove?  s  € ØŸ™Ó%ÜØJØñóð ð �K‰K˜Ÿ
™
Ð#Ø�‰×Ñ˜FÔ#ð $(×#3Ò#3õ
â#3‘��wØˆó ˆQ�7‹OÙ#3ó
ˆ×Ñ™Ðð
 ×(Ñ(×,Ñ,¨V°RÖ8ˆGØ�O‰O˜DÖ!ñ 9ð 	�‰×ÑÜ3<¸T×=MÑ=MÔ3NÖOÒ3NÑ/˜s¡K Q¨Q�1�(Š]Ñ3NÔOô	
ð �K‰Kœ˜D×,Ñ,Ó-Ñ.ùô
ùõ Ps   Á D*Á/D*Ã,D1c                óÀ  • U(       a  [        U5      nO
[        5       nUR                  U R                  ;   aa  UR                  UR                  :w  aG  U R                  UR                     S   nUR                  UR                  :X  a  UR	                  U5        UR                  U R                  ;   a+  UR	                  U R                  UR                     S   5        U(       d  U R                  UR                  U5        g/ nSnU R                   HR  u  pxn	Xƒ;   a4  U(       d+  SnUR                  UR                  U[        X5      45        M=  M?  UR                  XxU	45        MT     U(       aX  U R                  R                  U5        U H7  n
U R                  R                  U
S5       H  n	U	R                  U 5        M     M9     U(       d'  UR                  UR                  U[        X5      45        U R                  R	                  UR                  5       5        XPR                  SS& U R                  R                  5         U R                  R!                  [#        U R                  5       VVVVs0 s H  u  nu  pxoËXx4_M     snnnn5        U R                  R!                  U R                   VVVs0 s H	  u  pxoÇXx4_M     snnn5        gs  snnnnf s  snnnf )aº  add the given column to this collection, removing unaliased
versions of this column  as well as existing columns with the
same key.

e.g.::

    t = Table("sometable", metadata, Column("col1", Integer))
    t.columns.replace(Column("col1", Integer, key="columnone"))

will remove the original 'col1' from the collection, and add
the new column under the name 'columnname'.

Used by schema.Column to override columns during table reflection.

r   NFTra   )r  rZ   rä  r‰   rÌ  rƒ  rã  rO  rÇ  rå  Údifference_updaterÊ  rí   rØ  rH  r;  rx  rK  )r\   rÈ  Úextra_removeÚ
remove_colrÒ  Únew_colsÚreplacedr‡  rÎ  rc  ÚrcrL  r  s                r]   r�  ÚDedupeColumnCollection.replaceU  s3  € ö* Ü˜\Ó*‰Jä›ˆJà�;‰;˜$Ÿ+™+Ó%¨&¯*©*¸¿¹Ó*CØ—K‘K §¡Ñ,¨QÑ/ˆEØ�z‰z˜UŸY™YÓ&Ø—‘˜uÔ%à�:‰:˜Ÿ™Ó$Ø�N‰N˜4Ÿ;™; v§z¡zÑ2°1Ñ5Ô6æØ×#Ñ# F§J¡J°Ô7ØØKMˆØˆØ#×/Ô/‰OˆA�GØÓ ÞØ#�HØ—O‘OØŸ™ V¬^¸DÓ-IÐJöñ  ð —‘ ¨Ð 1Ö2ñ  0ö Ø�L‰L×*Ñ*¨:Ô6ã �Ø#×0Ñ0×4Ñ4°R¸Ö<�GØ—O‘O DÖ)ó  =ñ !ö Ø�O‰O˜VŸZ™Z¨´ÀÓ1MÐNÔOà�‰×Ñ˜×+Ñ+Ó-Ô.Ø&×Ñ™Ðà�‰×ÑÔà�‰×ÑÜ3<¸T×=MÑ=MÔ3NÖOÒ3NÑ/˜s¡K Q¨Q�1�(Š]Ñ3NÔOô	
ð 	�‰×Ñ¸4×;KÒ;KÕLÒ;K©K¨Q°Q ˜xšKÑ;KÓLÕMùõ PùäLs   É5KÊ7Kra   rx   )rÈ  r|  r‰   rŒ  r   rµ   )r‰   rŒ   r‡  r|  r   rµ   )rø  zIterable[Tuple[str, _NAMEDCOL]]r   rµ   )rø  zIterable[_NAMEDCOL]r   rµ   )rÈ  r|  r   rµ   )rÈ  r|  r™  zOptional[Iterable[_NAMEDCOL]]r   rµ   )rb   rc   rd   re   r¶   rÌ  rƒ  rö  r“  r?  r�  rg   ra   r`   r]   r~  r~  ì  sƒ   † ñ
ð 7;ð1Øð1Ø&3ð1à	õ1ô</ðØ4ðà	ôô8Fô/ð2 7;ðCNàðCNð 4ðCNð 
÷	CNð CNr`   r~  c                  óX   • \ rS rSrSrSS jrSS jrSS jrSSS jjrSS jr	SS jr
S	rg
)r`  i›  ©Ú_parentc                ó:  • [         R                  U SU5        [         R                  U SUR                  5        [         R                  U SUR                  5        [         R                  U SUR                  5        [         R                  U SUR
                  5        g )Nr¡  rå  rä  rã  rÊ  )rÅ   rÚ  rå  rä  rã  rÊ  )r\   rÍ  s     r]   rÆ   Ú!ReadOnlyColumnCollection.__init__   st   € Ü×Ñ˜4 ¨JÔ7Ü×Ñ˜4 ¨J×,>Ñ,>Ô?Ü×Ñ˜4 ¨:×+<Ñ+<Ô=Ü×Ñ˜4 °
×0FÑ0FÔGÜ×Ñ˜4 °×1HÑ1HÕIr`   c                ó   • SU R                   0$ ©Nr¡  r   r[   s    r]   rU  Ú%ReadOnlyColumnCollection.__getstate__§  s   € Ø˜4Ÿ<™<Ð(Ð(r`   c                ó0   • US   nU R                  U5        g r¥  )rÆ   )r\   rX  r�  s      r]   rY  Ú%ReadOnlyColumnCollection.__setstate__ª  s   € Ø�yÑ!ˆØ�‰�fÕr`   c                ó$   • U R                  5         g rx   ©Ú	_readonly)r\   rÈ  r‰   s      r]   rÌ  ÚReadOnlyColumnCollection.add®  ó   € Ø�‰Õr`   c                ó$   • U R                  5         g rx   rª  rñ  s     r]   r“  ÚReadOnlyColumnCollection.extend±  r­  r`   c                ó$   • U R                  5         g rx   rª  )r\   Úitems     r]   r?  ÚReadOnlyColumnCollection.remove´  r­  r`   ra   N)rÍ  rà  )r   zDict[str, _COL_co]rz  ).)rÈ  r   r‰   r   r   r   )r5   r   r   r   )r±  r   r   r   )rb   rc   rd   re   r·   rÆ   rU  rY  rÌ  r“  r?  rg   ra   r`   r]   r`  r`  ›  s(   † ð €IôJô)ôöô÷r`   r`  c                  ó8   • \ rS rSrSS jrS	S jrS rS
S jrSrg)Ú	ColumnSeti¸  c                ó
   • X;   $ rx   ra   r\  s     r]   r]  ÚColumnSet.contains_column¹  s
   € Ø‰{Ðr`   c                ó8   • U H  nU R                  U5        M     g rx   )rÌ  )r\   r  rÎ  s      r]   r“  ÚColumnSet.extend¼  s   € ÛˆCØ�H‰H�SŽMò r`   c                ó¦   • / nU H7  nU  H.  nUR                  U5      (       d  M  UR                  X4:H  5        M0     M9     [        R                  " U6 $ rx   )rn  rO  r5   Úand_)r\   rÒ  r#  rÖ   r  s        r]   rö  ÚColumnSet.__eq__À  sK   € ØˆÛˆAÛ�Ø×#Ñ# E×*Ó*Ø—H‘H˜Q™ZÖ(ó ñ ô �}Š}˜aÐ Ð r`   c                ó8   • [        [        S U  5       5      5      $ )Nc              3  ó$   #   • U  H  ov •  M     g 7frx   ra   )r2  rã   s     r]   r3  Ú%ColumnSet.__hash__.<locals>.<genexpr>É  s   é € Ð*¢T œ!¢Tùs   ‚)Úhashré  r[   s    r]   rC  ÚColumnSet.__hash__È  s   € Ü”EÑ*¡TÓ*Ó*Ó+Ð+r`   ra   N)rÎ  úColumnClause[Any]r   r�   )r  zIterable[Any]r   rµ   rD  )	rb   rc   rd   re   r]  r“  rö  rC  rg   ra   r`   r]   r´  r´  ¸  s   † ôôò!÷,r`   r´  rÁ  c                óì   •  [        [        U 5      R                  $ ! [         aM    [        R
                  " [        [        U 5      5       H#  n[        U5      (       d  M  UR                  s  s $    e f = f)z—Return the nearest .entity_namespace for the given entity.

If not immediately available, does an iterate to find a sub-element
that has one, if any.

)r	   r�   r’   r  r    Úiterater&   r˜   )Úentityr  s     r]   Ú_entity_namespacerÅ  Ì  sd   € ðÜÔ'¨Ó0×AÑAÐAøÜó Ü×$Ò$¤TÔ*?ÀÓ%HÖIˆDÜ'¨×-Ó-Ø×,Ñ,Ô,ñ Jð ðús   ‚ œ?A3ÁA3Á/A3c                ó¾   •  [        U 5      nU[        La  [        X1U5      $ [        X15      $ ! [         a%  n[        R
                  " SU < SU< S35      UeSnAff = f)z€Return an entry from an entity_namespace.


Raises :class:`_exc.InvalidRequestError` rather than attribute error
on not found.

zEntity namespace for "z" has no property "Ú"N)rÅ  rf   rõ  r  r*   rï   )rÄ  r‰   r|   Únsr  s        r]   Ú_entity_namespace_keyrÉ  ß  s_   € ð	Ü˜vÓ&ˆØœ&Ò Ü˜2 GÓ,Ð,ä˜2Ó#Ð#øÜó Ü×%Ó%Û@FËÐLó
àð	ûðús   ‚- ¢
- ­
A· AÁA)r—   r   r   zTypeGuard[_HasEntityNamespace])r5   zEUnion[ColumnElement[Any], FromClause, TextClause, _JoinTargetElement]r   zIterator[FromClause])r5   z!Iterable[roles.ColumnsClauseRole]r   rF   )rá   ro   r   ro   )rù   rŒ   r®   r   r   r³  )r5   úIterable[_CLE]r   rÊ  )r	  rÊ  r
  rÊ  r   z	Set[_CLE])r;  rŒ   r   zOptional[Dict[Any, Any]])rÄ  ú1Union[_HasEntityNamespace, ExternallyTraversible]r   r…   )rÄ  rË  r‰   rŒ   r|   z%Union[SQLCoreOperations[Any], _NoArg]r   r�   )¥r¶   Ú
__future__r   rç  Úenumr   rÏ   r   r÷   r‚  r.   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Ú r   r    Ú	cache_keyr!   r"   Ú
traversalsr#   r$   r%   r&   r'   r)   r*   r+   r,   r-   Úcompat_typingr/   Úutil.typingr0   r1   r2   r3   r4   r5   r6   Ú
_orm_typesr7   r8   Ú_typingr9   r:   rœ  r;   r<   r=   r>   r?   r@   rA   rB   ÚschemarC   rD   Ú
selectablerE   rF   rG   rH   ÚenginerI   rJ   Úengine.interfacesrK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rW   rf   r€   ri   rk   rl   rm   ro   rŒ   Ú_AmbiguousTableNameMaprq   rø   rƒ   r…   r�   r˜   r™   r›   r¹   rÒ   r×   rØ   rÙ   rä   rú   r¯   r   r  r  r  r  rG  r{  rb  r@  r’  rµ  rÀ  rÄ  ÚtyperË  râ  r-  r;  ÚStatementRoler±  ÚEventTargetr™  Ú	Visitabler¦  r¨  r¬  r¼  rÁ  rÂ  rÅ  rÇ  râ  r|  r~  ÚReadOnlyContainerr`  ré  r´  rÅ  rÉ  ra   r`   r]   Ú<module>rß     s¸  ðò 9õ #ã Ý Û Ý !Û Û 	Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý !Ý Ý Ý Ý Ý Ý Ý Ý Ý  Ý Ý å Ý Ý "Ý *Ý (Ý #Ý /Ý +Ý 'Ý Ý Ý Ý -Ý Ý *Ý "Ý Ý "Ý Ý #æÝÝÝÝ/Ý6ÝÝ#Ý%Ý'Ý$Ý&Ý'Ý%Ý+Ý$ÝÝ(Ý.Ý+Ý&Ý"Ý#Ý%Ý;Ý3Ý<Ý.Ý,Ý5Ý?Ý+Ý2Ý:Ý"æØ€IØ€HØ€Hô%ˆTô %ð —‘€ˆÓ ôI�ô Ið
 ×'Ñ'€
ˆEÓ 'áˆT˜Ñ€áˆe˜8 C¨ HÑ-Ñ.€à'¨¨S¨Ñ1Ð ô
˜zô 
ð4 2:×1DÒ1DØó2Ð Ð.ó ô
C�xô Cô8˜(ô 8ô
0ñ
 	�˜sÑ#€÷ñ ô@˜	ô ð<ððð ô	ð	Ø/ð	àô	ñ Ð3Ð;LÑMÐ ô%�m×,Ñ,ô %ôô0ò: ð?Øð?àô?ðØðàôô
Nôô8
�n S¨# XÑ.ô 8
ôv$�n S¨# XÑ.ô $ð@ ×ÓÐ*Ó+ó1ó ,ð1÷uCñ uC÷piñ iôX�ô ô$˜ô ô?�jô ?ô5�4ô 5ôB_5˜ò _5ôD@�w ô @ô(Ð'ô ô$n'�×$Ò$ô n'ôb	8˜×)Ò)ô 8ô*Ð'¨×);Ò);ô ôD�Mô Dô tô ô jô ñ �)˜U 4¨ 9Ñ-¨sÓ
3€á
�)Ð#7À4Ñ
H€ÙˆvÐ1Ñ2€ô)�W˜WÑ%ô )ôXE�w˜w¨Ð/Ñ0ô EñD �KÐ'9Ñ:€	ôlNÐ-¨c°9¨nÑ=ô lNô^Ø×ÒÐ,¨W°gÐ-=Ñ>ôô:,�—’Ð 3Ñ4ô ,ð(Ø=ðàôð, 6<ðØ=ðà	ðð 3ðð ö	r`   