Ë
    V.jÙ  ã                  ó˜  — 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 erd	dlmZ d	dlmZ d	dlmZ  e	de¬«      ZeefZ	  G d„ dej4                  «      ZeZ G d„ dej4                  «      Z G d„ dej<                  «      Z G d„ dej4                  «      Z  G d„ dej4                  «      Z! G d„ d e«      Z" G d!„ d"e«      Z# G d#„ d$ej<                  «      Z$ G d%„ d&ej<                  «      Z% G d'„ d(ej<                  «      Z&d-d)„Z' e
jP                  d*«      d.d+„«       Z)y,)/zSQLAlchemy ORM exceptions.é    )Úannotations)ÚAny)ÚOptional)ÚTuple)ÚType)ÚTYPE_CHECKING)ÚTypeVaré   )Ú_mapper_property_as_plain_nameé   )Úexc)Úutil)ÚMultipleResultsFound)ÚNoResultFound)ÚLoaderStrategy)ÚMapperProperty)ÚInstanceStateÚ_T)Úboundc                  ó   — e Zd ZdZy)ÚStaleDataErroraa  An operation encountered database state that is unaccounted for.

    Conditions which cause this to happen include:

    * A flush may have attempted to update or delete rows
      and an unexpected number of rows were matched during
      the UPDATE or DELETE statement.   Note that when
      version_id_col is used, rows in UPDATE or DELETE statements
      are also matched against the current known version
      identifier.

    * A mapped object with version_id_col was refreshed,
      and the version number coming back from the database does
      not match that of the object itself.

    * A object is detached from its parent object, however
      the object was previously attached to a different parent
      identity which was garbage collected, and a decision
      cannot be made if the new parent was really the most
      recent "parent".

    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úTC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\sqlalchemy/orm/exc.pyr   r   $   s   „ òr   r   c                  ó   — e Zd ZdZy)Ú
FlushErrorz0A invalid condition was detected during flush().Nr   r   r   r   r!   r!   @   s   „ Ú:r   r!   c                  ó   — e Zd ZdZy)ÚUnmappedErrorz?Base for exceptions that involve expected mappings not present.Nr   r   r   r   r#   r#   D   s   „ ÚIr   r#   c                  ó   — e Zd ZdZy)ÚObjectDereferencedErrorzPAn operation cannot complete due to an object being garbage
    collected.

    Nr   r   r   r   r%   r%   H   s   „ òr   r%   c                  ó   — e Zd ZdZdZy)ÚDetachedInstanceErrorzSAn attempt to access unloaded attributes on a
    mapped instance that is detached.Úbhk3N)r   r   r   r   Úcoder   r   r   r'   r'   O   s   „ ñ)ð �Dr   r'   c                  óL   — e Zd ZdZ ej
                  d«      ddd„«       Zdd„Zy)	ÚUnmappedInstanceErrorz;An mapping operation was requested for an unknown instance.úsqlalchemy.orm.baseNc                óh  — t         j                  j                  }|s8	 |j                  t	        |«      «       t        t	        |«      «      }d|›d|›d�}t        j                  | |«       y # t        $ r< dt        t	        |«      «      › d�}t        |t        «      r|dt        |«      z  z  }Y Œ[w xY w)NzClass z| is mapped, but this instance lacks instrumentation.  This occurs when the instance is created before sqlalchemy.orm.mapper(z) was called.úClass 'ú' is not mappedz;; was a class (%s) supplied where an instance was required?)
r   Ú	preloadedÚorm_baseÚclass_mapperÚtypeÚ_safe_cls_nameÚUnmappedClassErrorÚ
isinstancer#   Ú__init__)ÚselfÚobjÚmsgÚbaseÚnames        r   r7   zUnmappedInstanceError.__init__Y   s¬   € ä�~‰~×&Ñ&ˆáðØ×!Ñ!¤$ s£)Ô,Ü%¤d¨3£iÓ0‘ò
 &*ª4ð1ð ô 	×Ñ˜t SÕ)øô &ò Ø¤¬t°C«yÓ 9Ð:¸/ÐJ�Ü˜c¤4Ô(Øð$Ü&4°SÓ&9ñ:ñ�Cùðús   ž7A, Á,AB1Â0B1c                ó<   — | j                   d | j                  d   ffS ©Nr   ©Ú	__class__Úargs©r8   s    r   Ú
__reduce__z UnmappedInstanceError.__reduce__p   ó   € Ø�~‰~  d§i¡i°¡lÐ3Ð3Ð3r   ©N)r9   Úobjectr:   úOptional[str]©Úreturnr   ©r   r   r   r   r   Úpreload_moduler7   rC   r   r   r   r+   r+   V   s*   „ ÙEà€T×ÑÐ.Ó/ó*ó 0ð*ô,4r   r+   c                  ó"   — e Zd ZdZddd„Zdd„Zy)r5   z8An mapping operation was requested for an unknown class.Nc                óJ   — |st        |«      }t        j                  | |«       y rE   )Ú_default_unmappedr#   r7   )r8   Úclsr:   s      r   r7   zUnmappedClassError.__init__w   s   € ÙÜ# CÓ(ˆCÜ×Ñ˜t SÕ)r   c                ó<   — | j                   d | j                  d   ffS r>   r?   rB   s    r   rC   zUnmappedClassError.__reduce__|   rD   r   rE   )rO   zType[_T]r:   rG   rH   )r   r   r   r   r7   rC   r   r   r   r5   r5   t   s   „ ÙBô*ô
4r   r5   c                  óL   — e Zd ZdZ ej
                  d«      ddd„«       Zdd„Zy)	ÚObjectDeletedErroraï  A refresh operation failed to retrieve the database
    row corresponding to an object's known primary key identity.

    A refresh operation proceeds when an expired attribute is
    accessed on an object, or when :meth:`_query.Query.get` is
    used to retrieve an object which is, upon retrieval, detected
    as expired.   A SELECT is emitted for the target row
    based on primary key; if no row is returned, this
    exception is raised.

    The true meaning of this exception is simply that
    no row exists for the primary key identifier associated
    with a persistent object.   The row may have been
    deleted, or in some cases the primary key updated
    to a new value, outside of the ORM's management of the target
    object.

    r,   Nc                ó¤   — t         j                  j                  }|sd|j                  |«      z  }t        j
                  j                  | |«       y )NzDInstance '%s' has been deleted, or its row is otherwise not present.)r   r0   r1   Ú	state_strÚsa_excÚInvalidRequestErrorr7   )r8   Ústater:   r;   s       r   r7   zObjectDeletedError.__init__”   sH   € ä�~‰~×&Ñ&ˆáð0Ø26·.±.ÀÓ2GñHð ô
 	×"Ñ"×+Ñ+¨D°#Õ6r   c                ó<   — | j                   d | j                  d   ffS r>   r?   rB   s    r   rC   zObjectDeletedError.__reduce__    rD   r   rE   )rW   zInstanceState[Any]r:   rG   rH   rJ   r   r   r   rR   rR   €   s.   „ ñð& €T×ÑÐ.Ó/ó	7ó 0ð	7ô4r   rR   c                  ó   — e Zd ZdZy)ÚUnmappedColumnErrorz5Mapping operation was requested on an unknown column.Nr   r   r   r   rZ   rZ   ¤   s   „ Ú?r   rZ   c                  ó,   — e Zd ZdZ	 	 	 	 	 	 	 	 	 	 dd„Zy)ÚLoaderStrategyExceptionz2A loader strategy for an attribute does not exist.c                ó  — |€'t         j                  j                  | d|›d|›�«       y |€J ‚t         j                  j                  | dt        j                  |«      ›d|›dt        |«      ›dt        |«      ›d�	«       y )NzCan't find strategy z for zCan't apply "z" strategy to property "z", which is a "z7"; this loader strategy is intended to be used with a "z".)rU   rV   r7   r   Úclsname_as_plain_namer   )r8   Úapplied_to_property_typeÚrequesting_propertyÚ
applies_toÚactual_strategy_typeÚstrategy_keys         r   r7   z LoaderStrategyException.__init__«   s{   € ð  Ð'Ü×&Ñ&×/Ñ/ÙâÑ!4ð6õð Ð)Ð)Ð)Ü×&Ñ&×/Ñ/Ùô
 ×.Ñ.Ð/CÕDÚ'Ü2Ð3KÕLÜ2°:Õ>ðõr   N)
r_   ú	Type[Any]r`   zMapperProperty[Any]ra   z#Optional[Type[MapperProperty[Any]]]rb   zOptional[Type[LoaderStrategy]]rc   zTuple[Any, ...])r   r   r   r   r7   r   r   r   r\   r\   ¨   s:   „ Ù<ðà"+ðð 1ðð 8ð	ð
 =ðð &ôr   r\   c                óª   — 	 dj                  | j                  | j                  f«      }|S # t        $ r t	        | dd «      }|€t        | «      }Y |S w xY w)NÚ.r   )Újoinr   r   ÚAttributeErrorÚgetattrÚrepr)rO   Úcls_names     r   r4   r4   É   s]   € ð!Ø—8‘8˜SŸ^™^¨S¯\©\Ð:Ó;ˆð
 €Oøô	 ò !Ü˜3 
¨DÓ1ˆØÐÜ˜C“yˆHøØ€Oð	!ús   ‚'+ «#AÁAr,   c                óÒ   — t         j                  j                  }	 |j                  | «      j                  }t        | «      }|sd|› d�S y # t
        t        ft        z   $ r i }Y Œ.w xY w)Nr.   r/   )	r   r0   r1   Úmanager_of_classÚmappersr5   Ú	TypeErrorÚNO_STATEr4   )rO   r;   rn   r<   s       r   rN   rN   Ô   sw   € ä�>‰>×"Ñ"€DðØ×'Ñ'¨Ó,×4Ñ4ˆô ˜#Ó€DáØ˜˜˜oÐ.Ð.àøô 	Üðô 	ñò ð Šð	ús   œA ÁA&Á%A&N)rO   rd   rI   Ústr)rO   rd   rI   rG   )*r   Ú
__future__r   Útypingr   r   r   r   r   r	   r   r   Ú r   rU   r   r   Ú
interfacesr   r   rW   r   r   rh   ÚKeyErrorrp   ÚSQLAlchemyErrorr   ÚConcurrentModificationErrorr!   rV   r#   r%   r'   r+   r5   rR   rZ   r\   r4   rK   rN   r   r   r   Ú<module>ry      s0  ðñ !å "å Ý Ý Ý Ý  Ý å 0Ý Ý Ý &Ý áÝ*Ý*Ý$áˆT˜Ô€à˜HÐ%€Ø Lô�V×+Ñ+ô ð2 -Ð ô;�×'Ñ'ô ;ôJ�F×.Ñ.ô Jô˜f×4Ñ4ô ô˜F×2Ñ2ô ô4˜Mô 4ô<	4˜ô 	4ô!4˜×3Ñ3ô !4ôH@˜&×4Ñ4ô @ô˜f×8Ñ8ô óBð €×ÑÐ*Ó+òó ,ñr   