a
    •˜ëjÖy  ã                   @  s–  d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 dd	lm
Z
 dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z  ddlm!Z! ddlm"Z" ddl#m$Z$ ddl%m&Z& dd l'm(Z( d!dlmZ) d!d"lm*Z* d!d#lm+Z+ d!d$lm'Z' d!d%l,m-Z- d!d&l,m.Z. d!d'l/m0Z0 d!d(l1m2Z2 d!d)l1m3Z3 d!d*l4m5Z5 d!d+l6m7Z7 d!d,l6m8Z8 d!d-l6m9Z9 d!d.l6m:Z: d!d/l6m;Z; d!d0l6m<Z< d!d1l6m=Z= d!d2l6m>Z> e�r
dd3l?m@Z@ dd4l?mAZA dd5l?mBZB dd6l?mCZC dd7lmDZD dd8lEmFZF dd9lGmHZH dd:lImJZJ dd;lKmLZL dd<lKmMZM d!d=lNmOZO d!d>lPmQZQ d!d?lPmRZR d!d@lSmTZT d!dAl6mUZU d!dBl6mVZV edCedD�ZWedEedD�ZXedFdGdD�ZYg dH¢ZZe+j[G dIdJ„ dJeeW e"eW ee+j\ƒƒZ]G dKdL„ dLe]eW eeW ƒZ^G dMdN„ dNeeeW eeW ƒZ_dOS )Pz|MapperProperty implementations.

This is a private module which defines the behavior of individual ORM-
mapped attributes.

é    )Úannotations)ÚAny)Úcast)ÚDict)ÚList)ÚOptional)ÚSequence)ÚSet)ÚTuple)ÚType)ÚTYPE_CHECKING)ÚTypeVar)ÚUnioné   )Ú
attributes)Úexc)Ú_DeclarativeMapped)Úclass_mapper)ÚCompositeProperty)ÚConcreteInheritedProperty)ÚSynonymProperty)Ú_AttributeOptions)Ú_DEFAULT_ATTRIBUTE_OPTIONS)Ú_IntrospectsAnnotations)Ú_MapsColumns)ÚMapperProperty)ÚPropComparator)ÚStrategizedProperty)Ú_COLUMN_TOKEN)ÚRelationshipProperty)Úde_stringify_annotationé   )Ú
ForeignKey)Úlog)Úutil)Ú	coercions)Úroles)Ú_NoArg)ÚColumn)ÚSchemaConst)Ú
TypeEngine)Úde_optionalize_union_types)Úget_args)Úincludes_none)Ú	is_a_type)Ú
is_fwd_ref)Ú	is_pep593)Ú	is_pep695)ÚSelf)Ú_IdentityKeyType)Ú_InstanceDict)Ú_ORMColumnExprArgument)Ú_RegistryType)ÚMapped)Ú_ClassScanMapperConfig)ÚMapper)ÚSession)Ú_InstallLoaderCallableProto)ÚInstanceState)Ú	_InfoType)ÚColumnElement)ÚNamedColumn)ÚOperatorType)Ú_AnnotationScanType)ÚRODescriptorReferenceÚ_T)ÚboundÚ_PTÚ_NCzNamedColumn[Any])ÚColumnPropertyr   r   r   r   c                      s¤  e Zd ZU dZeZdZdZded< ded< ded	< d
ed< dZ	ddddddddddddœddddddddddddddœ‡ fdd„Z
dddddddddddœ
dd „Zed!d"œd#d$„ƒZed%d"œd&d'„ƒZdd"œd(d)„Ze d*d+¡d,d"œd-d.„ƒZe d*d+¡d,d"œd/d0„ƒZd1d"œd2d3„Zed1d"œd4d5„ƒZd6dd7œd8d9„Zdd"œ‡ fd:d;„Zd<d"œd=d>„Zd?d@dAd@dAddBdCddDœ	dEdF„ZG dGdH„ dHejee ƒZdd"œdIdJ„Z‡  ZS )KrG   z¬Describes an object attribute that corresponds to a table column
    or other column expression.

    Public constructor is the :func:`_orm.column_property` function.

    TFzList[NamedColumn[Any]]ÚcolumnsÚboolÚ_is_polymorphic_discriminatorúOptional[str]Ú_mapped_by_synonymzType[PropComparator[_T]]Úcomparator_factory)rH   ÚgroupÚdeferredÚ
instrumentrM   Úactive_historyÚexpire_on_flushÚ_creation_orderrJ   rL   Z_deferred_column_loaderZ_raise_column_loaderZ_renders_in_subqueriesÚ	raiseloadN)Úattribute_optionsrN   rO   rT   rM   rQ   rR   ÚinfoÚdocÚ_instrumentÚ_assume_readonly_dc_attributesz_ORMColumnExprArgument[_T]z_ORMColumnExprArgument[Any]zOptional[_AttributeOptions]z"Optional[Type[PropComparator[_T]]]zOptional[_InfoType])ÚcolumnÚadditional_columnsrU   rN   rO   rT   rM   rQ   rR   rV   rW   rX   rY   c                  sô   t ƒ j||d� |f| }dd„ |D ƒ| _|| _|| _|| _|| _|d urN|n| jj| _	|| _
|| _|	d urx| j |	¡ |
d urˆ|
| _n4t| jƒD ]"}t|dd ƒ}
|
d ur’|
| _ q¼q’d | _t | ¡ d| jfd| jff| _| jrð|  jd7  _d S )N)rU   rY   c                 S  s   g | ]}t  tj|¡‘qS © )r%   Úexpectr&   ZLabeledColumnExprRole©Ú.0Úcr\   r\   úX/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/sqlalchemy/orm/properties.pyÚ
<listcomp>£   s   z+ColumnProperty.__init__.<locals>.<listcomp>rW   rO   rP   ))rT   T)ÚsuperÚ__init__rH   rN   rO   rT   rP   Ú	__class__Ú
ComparatorrM   rQ   rR   rV   ÚupdaterW   ÚreversedÚgetattrr$   Úset_creation_orderÚstrategy_key)ÚselfrZ   rU   rN   rO   rT   rM   rQ   rR   rV   rW   rX   rY   r[   rH   Úcol©re   r\   ra   rd   Ž   sD    þ
ÿÿý
þzColumnProperty.__init__r8   r6   ú	Type[Any]ÚstrúOptional[Type[Mapped[Any]]]úOptional[_AnnotationScanType]ÚNone©
Ú	decl_scanÚregistryÚclsÚoriginating_moduleÚkeyÚmapped_containerÚ
annotationÚextracted_mapped_annotationÚis_dataclass_fieldÚreturnc
                 C  s.   | j d }
|
jd u r||
_|
jd u r*||
_d S ©Nr   )rH   ry   Úname)rl   ru   rv   rw   rx   ry   rz   r{   r|   r}   rZ   r\   r\   ra   Údeclarative_scanÉ   s
    


zColumnProperty.declarative_scanúOptional[MapperProperty[_T]]©r~   c                 C  s   | S ©Nr\   ©rl   r\   r\   ra   Úmapper_property_to_assignÛ   s    z(ColumnProperty.mapper_property_to_assignúList[Tuple[Column[Any], int]]c                 C  s   dd„ | j D ƒS )Nc                 S  s(   g | ] }t |tƒr|jd u r|df‘qS r   )Ú
isinstancer(   Útabler^   r\   r\   ra   rb   â   s   þz4ColumnProperty.columns_to_assign.<locals>.<listcomp>©rH   r…   r\   r\   ra   Úcolumns_to_assignß   s    þz ColumnProperty.columns_to_assignc                 C  s(   d| j v r| jjS d| j vp&| | jjvS )N)Zquery_expressionT)rO   T)rk   ZstrategyZ_have_default_expressionÚparentZ_readonly_propsr…   r\   r\   ra   Ú%_memoized_attr__renders_in_subqueriesè   s
    


ÿz4ColumnProperty._memoized_attr__renders_in_subquerieszsqlalchemy.orm.statezsqlalchemy.orm.strategiesz _InstallLoaderCallableProto[Any]c                 C  s.   t jj}t jj}|j | jj| | j	¡| j	¡S r„   ©
r$   Ú	preloadedZ	orm_stateZorm_strategiesr<   Z"_instance_level_callable_processorrŒ   Zclass_managerZLoadDeferredColumnsry   ©rl   ÚstateZ
strategiesr\   r\   ra   Ú&_memoized_attr__deferred_column_loaderð   s    
ýz5ColumnProperty._memoized_attr__deferred_column_loaderc                 C  s0   t jj}t jj}|j | jj| | j	d¡| j	¡S )NTrŽ   r�   r\   r\   ra   Ú#_memoized_attr__raise_column_loaderü   s    ýz2ColumnProperty._memoized_attr__raise_column_loaderzroles.ColumnsClauseRolec                 C  s   | j S )zsAllow the ColumnProperty to work in expression before it is turned
        into an instrumented attribute.
        )Ú
expressionr…   r\   r\   ra   Ú__clause_element__  s    z!ColumnProperty.__clause_element__c                 C  s
   | j d S )aÊ  Return the primary column or expression for this ColumnProperty.

        E.g.::


            class File(Base):
                # ...

                name = Column(String(64))
                extension = Column(String(8))
                filename = column_property(name + "." + extension)
                path = column_property("C:/" + filename.expression)

        .. seealso::

            :ref:`mapper_column_property_sql_expressions_composed`

        r   rŠ   r…   r\   r\   ra   r”     s    zColumnProperty.expressionzMapper[Any])Úmapperr~   c                 C  s0   | j s
d S tj|j| j|  | |¡|| jd� d S )N)Z
comparatorÚparententityrW   )rP   r   Zregister_descriptorÚclass_ry   rM   rW   )rl   r–   r\   r\   ra   Úinstrument_class%  s    
ûzColumnProperty.instrument_classc                   sV   t ƒ  ¡  t| jƒdkrRt| jjƒ | j¡rRt 	d| j| jd | jd | j
f ¡ d S )Nr   z»On mapper %s, primary key column '%s' is being combined with distinct primary key column '%s' in attribute '%s'. Use explicit properties to give each column its own mapped attribute name.r   )rc   Údo_initÚlenrH   ÚsetrŒ   Zprimary_keyÚ
issupersetr$   Úwarnry   r…   rn   r\   ra   rš   1  s    
ÿúÿzColumnProperty.do_initzColumnProperty[_T]c                 C  s   t | j| j| j| jdœŽS )N)rO   rN   rQ   )rG   rH   rO   rN   rQ   r…   r\   r\   ra   ÚcopyA  s    üzColumnProperty.copyr:   zInstanceState[Any]r4   zDict[Any, object]z#Dict[_IdentityKeyType[Any], object])	ÚsessionÚsource_stateÚsource_dictÚ
dest_stateÚ	dest_dictÚloadÚ
_recursiveÚ_resolve_conflict_mapr~   c	                 C  st   | j s
d S | j|v rL|| j }	|s.|	|| j< qp| | j¡}
|
 |||	d ¡ n$|jrp| j|vrp|j|| jgdd� d S )NT)Z	no_loader)rP   ry   Zget_implrœ   Zhas_identityZ_expire_attributes)rl   r    r¡   r¢   r£   r¤   r¥   r¦   r§   ÚvalueÚimplr\   r\   ra   ÚmergeI  s    


ÿzColumnProperty.mergec                   @  s®   e Zd ZU dZesdZded< ded< dddœd	d
„ZerHddœdd„Zddœdd„Z	ddœdd„Z
ddœdd„Zdddœdd„Zdddddœdd„Zdddddœd d!„Zd"S )#zColumnProperty.Comparatora€  Produce boolean, comparison, and other operators for
        :class:`.ColumnProperty` attributes.

        See the documentation for :class:`.PropComparator` for a brief
        overview.

        .. seealso::

            :class:`.PropComparator`

            :class:`.ColumnOperators`

            :ref:`types_operators`

            :attr:`.TypeEngine.comparator_factory`

        )r•   rV   Úexpressionsz*RODescriptorReference[ColumnProperty[_PT]]ÚpropzSequence[NamedColumn[Any]]r«   rF   )rZ   r~   c                 C  sT   | j }|||| jjdœ}|}| jjr>|}| jj |¡}||d< | |¡ d|dœ¡S )aí  annotate and possibly adapt a column to be returned
            as the mapped-attribute exposed version of the column.

            The column in this context needs to act as much like the
            column in an ORM mapped context as possible, so includes
            annotations to give hints to various ORM functions as to
            the source entity of this column.   It also adapts it
            to the mapper's with_polymorphic selectable if one is
            present.

            )Zentity_namespacer—   ZparentmapperÚ	proxy_keyZadapt_columnZorm)Zcompile_state_pluginZplugin_subject)Z_parententityr¬   ry   Z_parentmapperZ_polymorphic_adapterÚtraverseZ	_annotateZ_set_propagate_attrs)rl   rZ   Úper   rm   Zmapper_local_colr\   r\   ra   Ú_orm_annotate_column‡  s    ü
ÿz.ColumnProperty.Comparator._orm_annotate_columnzNamedColumn[_PT]rƒ   c                 C  s   d S r„   r\   r…   r\   r\   ra   r•   ±  ó    z,ColumnProperty.Comparator.__clause_element__c                 C  s4   | j r|   | jjd | jj¡S |  | jjd ¡S d S r   )Úadapterr¬   rH   ry   r°   r…   r\   r\   ra   Ú#_memoized_method___clause_element__³  s    z=ColumnProperty.Comparator._memoized_method___clause_element__r=   c                 C  s0   |   ¡ }z|jW S  ty*   | jj Y S 0 dS )z(The .info dictionary for this attribute.N)r•   rV   ÚAttributeErrorr¬   )rl   Zcer\   r\   ra   Ú_memoized_attr_info»  s
    z-ColumnProperty.Comparator._memoized_attr_infoc                   s6   ˆ j r‡ fdd„ˆ jjD ƒS ‡ fdd„ˆ jjD ƒS dS )z¡The full sequence of columns referenced by this
            attribute, adjusted for any aliasing in progress.

            .. versionadded:: 1.3.17

            c                   s   g | ]}ˆ   |ˆ jj¡‘qS r\   )r²   r¬   ry   ©r_   rm   r…   r\   ra   rb   Ì  s   ÿzHColumnProperty.Comparator._memoized_attr_expressions.<locals>.<listcomp>c                   s   g | ]}ˆ   |¡‘qS r\   )r°   r¶   r…   r\   ra   rb   Ñ  s   N)r²   r¬   rH   r…   r\   r…   ra   Ú_memoized_attr_expressionsÄ  s    
þ
ÿz4ColumnProperty.Comparator._memoized_attr_expressionsrp   r   )ry   r~   c                 C  s   t |  ¡ |ƒS )z‡proxy attribute access down to the mapped column.

            this allows user-defined comparison methods to be accessed.
            )ri   r•   )rl   ry   r\   r\   ra   Ú_fallback_getattrÕ  s    z+ColumnProperty.Comparator._fallback_getattrr@   úColumnElement[Any]©ÚopÚotherÚkwargsr~   c                 O  s   ||   ¡ g|¢R i |¤ŽS r„   ©r•   ©rl   r»   r¼   r½   r\   r\   ra   ÚoperateÜ  s    z!ColumnProperty.Comparator.operatec                 K  s"   |   ¡ }|| ||¡|fi |¤ŽS r„   ©r•   Z_bind_param©rl   r»   r¼   r½   rm   r\   r\   ra   Úreverse_operateá  s    z)ColumnProperty.Comparator.reverse_operateN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú	__slots__Ú__annotations__r°   r•   r³   rµ   r·   r¸   rÀ   rÃ   r\   r\   r\   ra   rf   c  s   
(	rf   c                 C  s.   | j r| jst | ¡S t| j jjƒd | j S )NÚ.)rŒ   ry   ÚobjectÚ__repr__rp   r˜   rÄ   r…   r\   r\   ra   Ú__str__ç  s    
zColumnProperty.__str__) rÄ   rÅ   rÆ   rÇ   r   Zstrategy_wildcard_keyÚinherit_cacheZ_links_to_entityrÉ   rÈ   rd   r�   Úpropertyr†   r‹   r�   r$   Úpreload_moduler’   r“   r•   r”   r™   rš   rŸ   rª   ZMemoizedSlotsr   rE   rf   rÍ   Ú__classcell__r\   r\   rn   ra   rG   a   sR   
ò.; 

 rG   c                   @  s   e Zd ZdZdZdS )ÚMappedSQLExpressionaN  Declarative front-end for the :class:`.ColumnProperty` class.

    Public constructor is the :func:`_orm.column_property` function.

    .. versionchanged:: 2.0 Added :class:`_orm.MappedSQLExpression` as
       a Declarative compatible subclass for :class:`_orm.ColumnProperty`.

    .. seealso::

        :class:`.MappedColumn`

    TN)rÄ   rÅ   rÆ   rÇ   rÎ   r\   r\   r\   ra   rÒ   í  s   rÒ   c                   @  sT  e Zd ZU dZdZded< ded< ded< d	ed
< ded< ded< dddœdd„Zdddœdd„Zeddœdd„ƒZ	eddœdd„ƒZ
eddœdd „ƒZd	dœd!d"„Zd#ddd$d%œd&d'„Zd#ddd$d%œd(d)„Zddœd*d+„Zd,dd	d	d-œd.d/„Zd,d0d1ddd2d3d3dd4d5œ
d6d7„Ze d8¡d,d0d1dddd9d4d:œd;d<„ƒZd1d,dd0d9dd4d=œd>d?„Zd@S )AÚMappedColumna_  Maps a single :class:`_schema.Column` on a class.

    :class:`_orm.MappedColumn` is a specialization of the
    :class:`_orm.ColumnProperty` class and is oriented towards declarative
    configuration.

    To construct :class:`_orm.MappedColumn` objects, use the
    :func:`_orm.mapped_column` constructor function.

    .. versionadded:: 2.0


    )rZ   rS   Ú_sort_orderÚforeign_keysÚ_has_nullableÚ_has_insert_defaultrO   Údeferred_groupÚdeferred_raiseloadrQ   Ú_attribute_optionsÚ_has_dataclass_argumentsÚ_use_existing_columnzUnion[_NoArg, bool]rO   rI   rÙ   rK   rØ   ú
Column[_T]rZ   zOptional[Set[ForeignKey]]rÕ   r   rÚ   r   )ÚargÚkwc                   s&  |  dt¡ | _‰ |  dd¡| _ˆ d uoJˆ tkoJt‡ fdd„tˆ jƒD ƒƒ| _|  dtj	¡}|tj	u| _
| j
rx||d< nˆ jtj	urŽˆ j|d< |  dd ¡| _|  d	d ¡| _|  d
tj	¡| _|  dd¡| _|  dtj	¡| _tdt|i |¤Žƒ| _| jj| _d|v �o| d¡d tjfv| _t | ¡ d S )NrU   Zuse_existing_columnFc                 3  s(   | ] \}}|d krˆ | t juV  qdS )Údataclasses_defaultN)r'   ÚNO_ARG)r_   ÚiÚattr©Z	attr_optsr\   ra   Ú	<genexpr>4  s   þz(MappedColumn.__init__.<locals>.<genexpr>Úinsert_defaultÚdefaultrØ   rÙ   rO   rQ   Z
sort_orderrÝ   Únullable)Úpopr   rÚ   rÜ   ÚanyÚ	enumerateÚ_fieldsrÛ   r'   rá   r×   rà   rØ   rÙ   rO   rQ   rÔ   r   r(   rZ   rÕ   Úgetr)   ZNULL_UNSPECIFIEDrÖ   r$   rj   )rl   rÞ   rß   ræ   r\   rä   ra   rd   *  s:    ÿ
ÿþý



þzMappedColumn.__init__r2   )rß   r~   c                 K  sŠ   | j  | j ¡}| jjf i |¤Ž|_| j|_| j|_| j|_|jj|_| j|_| j	|_	| j
|_
| j|_| j|_| j|_| j|_t |¡ |S r„   )re   Ú__new__rZ   Ú_copyrO   rØ   rÙ   rÕ   rQ   rÖ   rÚ   r×   rÛ   rÜ   rÔ   r$   rj   )rl   rß   Únewr\   r\   ra   rï   Q  s    

zMappedColumn._copyrp   rƒ   c                 C  s   | j jS r„   )rZ   r€   r…   r\   r\   ra   r€   b  s    zMappedColumn.namer‚   c                 C  sP   | j }|tju r t| jp| jƒ}|s*| jrHt| j|| j| j| j	| jd�S d S d S )N)rO   rN   rT   rU   rQ   )
rO   r'   rá   rI   rØ   rÙ   rQ   rG   rZ   rÚ   )rl   Zeffective_deferredr\   r\   ra   r†   f  s    

ÿ
ú	z&MappedColumn.mapper_property_to_assignr‡   c                 C  s   | j | jtjur| jndfgS r   )rZ   rÔ   r'   rá   r…   r\   r\   ra   r‹   z  s    
ÿûÿzMappedColumn.columns_to_assignc                 C  s   | j S r„   )rZ   r…   r\   r\   ra   r•   ‡  s    zMappedColumn.__clause_element__r@   r¹   rº   c                 O  s   ||   ¡ g|¢R i |¤ŽS r„   r¾   r¿   r\   r\   ra   rÀ   Š  s    zMappedColumn.operatec                 K  s"   |   ¡ }|| ||¡|fi |¤ŽS r„   rÁ   rÂ   r\   r\   ra   rÃ   �  s    zMappedColumn.reverse_operatec                 C  s   t ƒ S r„   )rÓ   r…   r\   r\   ra   Úfound_in_pep593_annotated•  s    z&MappedColumn.found_in_pep593_annotatedr8   )ru   ry   Úgiven_columnr~   c                 C  sV   | j rR|jrR|jrR|jr"t d¡‚t|jdƒ}|jd ur>|jn|}|jj	 
||¡}|S )Nz3Can't use use_existing_column with deferred mappersF)rÜ   ZinheritsÚsingleZis_deferredÚsa_excÚArgumentErrorr   r€   Zlocal_tabler`   rí   )rl   ru   ry   rò   Zsupercls_mapperZcolnamer\   r\   ra   Ú_adjust_for_existing_columnš  s"    ÿþýÿÿÿz(MappedColumn._adjust_for_existing_columnr6   ro   rq   rr   rs   rt   c
                 C  s‚   | j }
|  ||| j ¡ }
| _ |
jd u r,||
_|
jd u r<||
_|
j}|d u rj|jrf| j jsf|  ||¡ nd S |  ||||||¡ d S r„   )	rZ   rö   ry   r€   ÚtypeÚ_isnullrÕ   Z_raise_for_requiredÚ_init_column_for_annotation)rl   ru   rv   rw   rx   ry   rz   r{   r|   r}   rZ   Úsqltyper\   r\   ra   r�   ³  s*    ÿ


úzMappedColumn.declarative_scanzsqlalchemy.orm.decl_baserA   )ru   rv   rw   rx   ry   Ú
param_nameÚparam_annotationr~   c           	      C  s.   t jj}| || j¡ |  ||||||¡ d S r„   )r$   r�   Zorm_decl_baseZ_undefer_column_namerZ   rù   )	rl   ru   rv   rw   rx   ry   rû   rü   Ú	decl_baser\   r\   ra   Údeclarative_scan_for_compositeÛ  s
    ÿz+MappedColumn.declarative_scan_for_composite)rw   ru   ry   rv   Úargumentrx   r~   c                 C  s¼  | j j}t|ddd�r2|d us"J ‚t|||dd�}t|ƒ}| jsH|| j _d}	d}
d }d }t|ƒ}t|ƒrŠ|}t|j	ƒ}t
|ƒ}|rŠ|| }t|ƒr¾d}
t
|ƒ}|d }|r²t|ƒ}|dd … }	|	D ]}t|tƒrÂ|} qÞqÂd }|d u�rT| ||| j ¡| _ | j�s|j jd u�rd | j _|j  | j ¡ | j j}|jtju�rR| jtju �rR|j| _|jd u�rr| jd u �rr|j| _|jd u�r’| jd u �r’|j| _|j�r¨| j�s¨d| _|j�r¸|j| _|jd u�rÚ| jtju �rÚ|j| _|j jd u�sö|j jd u�rt dd	¡ |j�rTt|j j!ƒD ]<\}}|j | tju�r| "d
d¡}t d|› d�d	¡ �q|j#�r¸| j j$�s¸|
�rv||g}n|g}|d u�r’| %d|¡ |D ](}|j&|||u d�}|d u�r– �q¬�q–t|t'ƒ�sät|tƒ�rt(|t'ƒ�rt) *d| j j›d|› d�¡‚nªt+|d ƒ�r�t,|ƒdk�r$d}nFt,|ƒdk�rNd|d › d|d › d�}ndd -dd„ |D ƒ¡ d }t) *d|d › d| j j›d|› �¡‚nt) *d| j j›d |›d!�¡‚| j  .|¡ d S )"NT)Zcheck_genericZcheck_for_plain_string)Zinclude_genericr\   Fr   r   z_Can't use the 'key' or 'name' arguments in Annotated with mapped_column(); this will be ignoredz2.0.22Zdataclasses_Ú z
Argument 'zp' is a dataclass argument and cannot be specified within a mapped_column() bundled inside of an Annotated object)Z_do_fallbackszThe type provided inside the z4 attribute Mapped annotation is the SQLAlchemy type z . Expected a Python type insteadz1the type object is not resolvable by the registryr!   z	neither 'z' nor 'z ' are resolvable by the registryznone of z, c                 s  s   | ]}d |› d �V  qdS )ú'Nr\   )r_   Útr\   r\   ra   rå   ”  r±   z;MappedColumn._init_column_for_annotation.<locals>.<genexpr>z are resolvable by the registryzSCould not locate SQLAlchemy Core type when resolving for Python type indicated by 'z)' inside the Mapped[] annotation for the z attribute; zThe object provided inside the zC attribute Mapped annotation is not a Python type, it's the object z. Expected a Python type.)/rZ   r÷   r/   r    r-   rÖ   rè   r+   r1   Z	__value__r,   r0   rˆ   rÓ   rö   r×   rç   Z_mergerO   r'   rá   rØ   rÙ   rÜ   rQ   rÔ   ry   r€   r$   Zwarn_deprecatedrÛ   rë   rÚ   rì   Úreplacerø   rÕ   ÚinsertZ_resolve_typer*   Ú
issubclassÚorm_excZMappedAnnotationErrorr.   r›   ÚjoinZ	_set_type)rl   rw   ru   ry   rv   rÿ   rx   rú   rè   Zfind_mapped_inZour_type_is_pep593Zraw_pep_593_typeZraw_pep_695_typeZour_typeZour_argsZpep_593_componentsÚelemZuse_args_fromÚidxrÞ   ZchecksZ
check_typeZnew_sqltypeZdetailr\   r\   ra   rù   ì  s   	ÿÿ


ÿÿ
þ
ÿ
þÿþÿþÿþÿ
þ
ÿ
þýÿÿÿ
ü

ÿ

ÿþþÿÿÿÿþÿÿýüÿþÿz(MappedColumn._init_column_for_annotationN)rÄ   rÅ   rÆ   rÇ   rÈ   rÉ   rd   rï   rÏ   r€   r†   r‹   r•   rÀ   rÃ   rñ   rö   r�   r$   rÐ   rþ   rù   r\   r\   r\   ra   rÓ   ÿ  s2   
' (rÓ   N)`rÇ   Ú
__future__r   Útypingr   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r  Úbaser   r   Zdescriptor_propsr   r   r   Z
interfacesr   r   r   r   r   r   r   Zpath_registryr   Zrelationshipsr   r$   r    rô   r"   r#   Zsqlr%   r&   Zsql.baser'   Z
sql.schemar(   r)   Zsql.type_apir*   Zutil.typingr+   r,   r-   r.   r/   r0   r1   r2   Ú_typingr3   r4   r5   r6   r7   rý   r8   r–   r9   r    r:   r‘   r;   r<   Zsql._typingr=   Zsql.elementsr>   r?   Zsql.operatorsr@   rA   rB   rC   rE   rF   Ú__all__Zclass_loggerZ
IdentifiedrG   rÒ   rÓ   r\   r\   r\   ra   Ú<module>   sª   	
ü   
ý