§
    WøÁiõ  ã                  óŽ  — 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j        ¦  «        ZeZ G d„ dej        ¦  «        Z G d„ dej        ¦  «        Z G d„ dej        ¦  «        Z  G d„ dej        ¦  «        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&d2d-„Z' e
j(        d.¦  «        d3d0„¦   «         Z)d1S )4z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dS )Ú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__© ó    ú\/var/www/html/jarvis.com/web/backend/venv/lib/python3.11/site-packages/sqlalchemy/orm/exc.pyr   r   $   s   € € € € € ðð ð ð r   r   c                  ó   — e Zd ZdZdS )Ú
FlushErrorz0A invalid condition was detected during flush().Nr   r   r   r   r!   r!   @   s   € € € € € Ø:Ð:Ð:Ð:r   r!   c                  ó   — e Zd ZdZdS )ÚUnmappedErrorz?Base for exceptions that involve expected mappings not present.Nr   r   r   r   r#   r#   D   s   € € € € € ØIÐIÐIÐIr   r#   c                  ó   — e Zd ZdZdS )Ú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dS )Ú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   € € € € € ð)ð )ð €D€D€Dr   r'   c                  óP   — e Zd ZdZ ej        d¦  «        ddd„¦   «         Zdd„ZdS )ÚUnmappedInstanceErrorz;An mapping operation was requested for an unknown instance.úsqlalchemy.orm.baseNÚobjÚobjectÚmsgúOptional[str]c                ó¨  — t           j        j        }|s£	 |                     t	          |¦  «        ¦  «         t          t	          |¦  «        ¦  «        }d|›d|›d�}nZ# t          $ rM dt          t	          |¦  «        ¦  «        › d�}t          |t          ¦  «        r|dt          |¦  «        z  z  }Y nw xY wt           	                    | |¦  «         d S )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__)Úselfr-   r/   ÚbaseÚnames        r   r;   zUnmappedInstanceError.__init__Y   sï   € åŒ~Ô&ˆàð 	ðØ×!Ò!¥$ s¡)¤)Ñ,Ô,Ð,Ý%¥d¨3¡i¤iÑ0Ô0��ð
 &* T T¨4¨4¨4ð1ð �øõ &ð ð ð ØJ¥­t°C©y¬yÑ 9Ô 9ÐJÐJÐJ�Ý˜c¥4Ñ(Ô(ð Øð$Ý&4°SÑ&9Ô&9ñ:ñ�Cøøðøøøõ 	×Ò˜t SÑ)Ô)Ð)Ð)Ð)s   •AA ÁAB4Â3B4Úreturnr   c                ó.   — | j         d | j        d         ffS ©Nr   ©Ú	__class__Úargs©r<   s    r   Ú
__reduce__z UnmappedInstanceError.__reduce__p   ó   € ØŒ~  d¤i°¤lÐ3Ð3Ð3r   ©N)r-   r.   r/   r0   ©r?   r   ©r   r   r   r   r   Úpreload_moduler;   rF   r   r   r   r+   r+   V   s`   € € € € € ØEÐEà€TÔÐ.Ñ/Ô/ð*ð *ð *ð *ñ 0Ô/ð*ð,4ð 4ð 4ð 4ð 4ð 4r   r+   c                  ó$   — e Zd ZdZddd„Zdd
„ZdS )r9   z8An mapping operation was requested for an unknown class.NÚclsúType[_T]r/   r0   c                ó^   — |st          |¦  «        }t                               | |¦  «         d S rH   )Ú_default_unmappedr#   r;   )r<   rM   r/   s      r   r;   zUnmappedClassError.__init__w   s3   € Øð 	)Ý# CÑ(Ô(ˆCÝ×Ò˜t SÑ)Ô)Ð)Ð)Ð)r   r?   r   c                ó.   — | j         d | j        d         ffS rA   rB   rE   s    r   rF   zUnmappedClassError.__reduce__|   rG   r   rH   )rM   rN   r/   r0   rI   )r   r   r   r   r;   rF   r   r   r   r9   r9   t   sG   € € € € € ØBÐBð*ð *ð *ð *ð *ð
4ð 4ð 4ð 4ð 4ð 4r   r9   c                  óP   — e Zd ZdZ ej        d¦  «        ddd„¦   «         Zdd„ZdS )Ú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,   NÚstateúInstanceState[Any]r/   r0   c                óœ   — t           j        j        }|sd|                     |¦  «        z  }t          j                             | |¦  «         d S )NzDInstance '%s' has been deleted, or its row is otherwise not present.)r   r4   r5   Ú	state_strÚsa_excÚInvalidRequestErrorr;   )r<   rT   r/   r=   s       r   r;   zObjectDeletedError.__init__”   sT   € åŒ~Ô&ˆàð 	ð0Ø26·.².ÀÑ2GÔ2GñHð õ
 	Ô"×+Ò+¨D°#Ñ6Ô6Ð6Ð6Ð6r   r?   r   c                ó.   — | j         d | j        d         ffS rA   rB   rE   s    r   rF   zObjectDeletedError.__reduce__    rG   r   rH   )rT   rU   r/   r0   rI   rJ   r   r   r   rS   rS   €   sf   € € € € € ðð ð& €TÔÐ.Ñ/Ô/ð	7ð 	7ð 	7ð 	7ñ 0Ô/ð	7ð4ð 4ð 4ð 4ð 4ð 4r   rS   c                  ó   — e Zd ZdZdS )ÚUnmappedColumnErrorz5Mapping operation was requested on an unknown column.Nr   r   r   r   r\   r\   ¤   s   € € € € € Ø?Ð?Ð?Ð?r   r\   c                  ó   — e Zd ZdZdd„ZdS )ÚLoaderStrategyExceptionz2A loader strategy for an attribute does not exist.Úapplied_to_property_typeú	Type[Any]Úrequesting_propertyúMapperProperty[Any]Ú
applies_toú#Optional[Type[MapperProperty[Any]]]Úactual_strategy_typeúOptional[Type[LoaderStrategy]]Ústrategy_keyúTuple[Any, ...]c                ó  — |€(t           j                             | d|›d|›�¦  «         d S |€J ‚t           j                             | dt          j        |¦  «        ›d|›dt          |¦  «        ›dt          |¦  «        ›d�	¦  «         d S )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".)rX   rY   r;   r   Úclsname_as_plain_namer   )r<   r_   ra   rc   re   rg   s         r   r;   z LoaderStrategyException.__init__«   sÆ   € ð  Ð'ÝÔ&×/Ò/Ø�à�<�<Ð!4Ð!4ð6ñô ð ð ð ð Ð)Ð)Ð)ÝÔ&×/Ò/Ø�õ
 Ô.Ð/CÑDÔDÐDÐDØ'Ð'Ð'Ý2Ð3KÑLÔLÐLÐLÝ2°:Ñ>Ô>Ð>Ð>ðñô ð ð ð r   N)
r_   r`   ra   rb   rc   rd   re   rf   rg   rh   )r   r   r   r   r;   r   r   r   r^   r^   ¨   s.   € € € € € Ø<Ð<ðð ð ð ð ð r   r^   rM   r`   r?   Ústrc                ó°   — 	 d                      | j        | j        f¦  «        }n2# t          $ r% t	          | dd ¦  «        }|€t          | ¦  «        }Y nw xY w|S )Nú.r   )Újoinr   r   ÚAttributeErrorÚgetattrÚrepr)rM   Úcls_names     r   r8   r8   É   si   € ð!Ø—8’8˜Sœ^¨S¬\Ð:Ñ;Ô;ˆˆøÝð !ð !ð !Ý˜3 
¨DÑ1Ô1ˆØÐÝ˜C‘y”yˆHøøð!øøøð €Os   ‚!$ ¤,AÁAr,   r0   c                óÐ   — t           j        j        }	 |                     | ¦  «        j        }n!# t
          t          ft          z   $ r i }Y nw xY wt          | ¦  «        }|sd|› d�S d S )Nr2   r3   )	r   r4   r5   Úmanager_of_classÚmappersr9   Ú	TypeErrorÚNO_STATEr8   )rM   r=   ru   r>   s       r   rP   rP   Ô   sŽ   € åŒ>Ô"€DðØ×'Ò'¨Ñ,Ô,Ô4ˆˆøåÝðõ 	ñð ð ð ð ˆˆˆð	øøøõ
 ˜#ÑÔ€Dàð Ø.˜Ð.Ð.Ð.Ð.àˆts   “. ®AÁAN)rM   r`   r?   rk   )rM   r`   r?   r0   )*r   Ú
__future__r   Útypingr   r   r   r   r   r	   r   r   Ú r   rX   r   r   Ú
interfacesr   r   rT   r   r   ro   ÚKeyErrorrw   ÚSQLAlchemyErrorr   ÚConcurrentModificationErrorr!   rY   r#   r%   r'   r+   r9   rS   r\   r^   r8   rK   rP   r   r   r   ú<module>r      sg  ðð !Ð  à "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  Ø Ð Ð Ð Ð Ð à 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø &Ð &Ð &Ð &Ð &Ð &Ø Ð Ð Ð Ð Ð àð %Ø*Ð*Ð*Ð*Ð*Ð*Ø*Ð*Ð*Ð*Ð*Ð*Ø$Ð$Ð$Ð$Ð$Ð$à€WˆT˜ÐÑÔ€à˜HÐ%€Ø Lðð ð ð ð �VÔ+ñ ô ð ð2 -Ð ð;ð ;ð ;ð ;ð ;�Ô'ñ ;ô ;ð ;ðJð Jð Jð Jð J�FÔ.ñ Jô Jð Jðð ð ð ð ˜fÔ4ñ ô ð ðð ð ð ð ˜FÔ2ñ ô ð ð4ð 4ð 4ð 4ð 4˜Mñ 4ô 4ð 4ð<	4ð 	4ð 	4ð 	4ð 	4˜ñ 	4ô 	4ð 	4ð!4ð !4ð !4ð !4ð !4˜Ô3ñ !4ô !4ð !4ðH@ð @ð @ð @ð @˜&Ô4ñ @ô @ð @ðð ð ð ð ˜fÔ8ñ ô ð ðBð ð ð ð €ÔÐ*Ñ+Ô+ðð ð ñ ,Ô+ðð ð r   