?????????? ????????? - ??????????????? - /home/agenciai/.local/lib/python3.9/site-packages/sqlalchemy/orm/__pycache__/exc.cpython-39.pyc
???????
a ��Jh� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z d d l mZ ddlm Z dd lm Z ddl mZ ddl mZ er�d dlmZ d dlmZ d dlmZ e ded�ZeefZG dd� dej�ZeZG dd� dej�ZG dd� dej�ZG dd� dej �Z!G dd� dej�Z"G dd � d ej�Z#G d!d"� d"e!�Z$G d#d$� d$e!�Z%G d%d&� d&ej �Z&G d'd(� d(ej �Z'G d)d*� d*ej �Z(d+d,d-�d.d/�Z)e �*d0�d+d1d-�d2d3��Z+d4S )5zSQLAlchemy ORM exceptions.� )�annotations)�Any)�Optional)�Tuple)�Type)� TYPE_CHECKING)�TypeVar� )�_mapper_property_as_plain_name� )�exc)�util)�MultipleResultsFound)� NoResultFound)�LoaderStrategy)�MapperProperty)� InstanceState�_T)�boundc @ s e Zd ZdZdS )�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__� r r �G/home/agenciai/.local/lib/python3.9/site-packages/sqlalchemy/orm/exc.pyr $ s r c @ s e Zd ZdZdS )� FlushErrorz0A invalid condition was detected during flush().Nr r r r r r @ s r c @ s e Zd ZdZdS )�MappedAnnotationErrorz�Raised when ORM annotated declarative cannot interpret the expression present inside of the :class:`.Mapped` construct. .. versionadded:: 2.0.40 Nr r r r r r D s r c @ s e Zd ZdZdS )� UnmappedErrorz?Base for exceptions that involve expected mappings not present.Nr r r r r r M s r c @ s e Zd ZdZdS )�ObjectDereferencedErrorzPAn operation cannot complete due to an object being garbage collected. Nr r r r r r Q s r c @ s e Zd ZdZdZdS )�DetachedInstanceErrorzSAn attempt to access unloaded attributes on a mapped instance that is detached.Zbhk3N)r r r r �coder r r r r! X s r! c @ s: e Zd ZdZe�d�d ddd�dd��Zd d �dd�ZdS )�UnmappedInstanceErrorz;An mapping operation was requested for an unknown instance.�sqlalchemy.orm.baseN�object� Optional[str])�obj�msgc C s� t jj}|sxz*|�t|�� tt|��}d||f }W n@ tyv dtt|��� d�}t|t�rr|dt|� 7 }Y n0 t� | |� d S )Nz�Class %r is mapped, but this instance lacks instrumentation. This occurs when the instance is created before sqlalchemy.orm.mapper(%s) was called.�Class '�' is not mappedz;; was a class (%s) supplied where an instance was required?) r � preloaded�orm_baseZclass_mapper�type�_safe_cls_name�UnmappedClassError� isinstancer �__init__)�selfr'