관리-도구
편집 파일: attributes.cpython-37.pyc
B ��4]A � @ s d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm Z dd lmZ ddlmZ ddlm Z dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z d d!lm!Z! d d"lm"Z" d d#lm#Z# e"j$G d$d%� d%ej%ej&ej'��Z(G d&d'� d'e(�Z)d(d)� Z*e#�+d*�Z,e#�+d+�Z-e#�+d,�Z.e#�+d-�Z/e#�+d.�Z0G d/d0� d0e1�Z2G d1d2� d2e1�Z3G d3d4� d4e3�Z4G d5d6� d6e4�Z5G d7d8� d8e3�Z6d9d:� Z7e#�+d;�Z8e9e:e�e:e�e:e�g�Z;e#�<d<d=d>d?g�Z=G d@d<� d<e=�Z=e=ddd�Z>efdAdB�Z?efdCdD�Z@d`dFdG�ZAdHdI� ZBdadJdK�ZCdbdLdM�ZDdNdO� ZEdPdQ� ZFdRdS� ZGdTdU� ZHdcdVdW�ZIdXdY� ZJdZd[� ZKd\d]� ZLd^d_� ZMdS )dz�Defines instrumentation for class attributes and their interaction with instances. This module is usually not directly visible to user applications, but defines a large part of the ORM's interactivity. � N� )�collections)�exc)� interfaces)� ATTR_EMPTY)�ATTR_WAS_SET)�CALLABLES_OK)�INIT_OK)� instance_dict)�instance_state)�instance_str)�LOAD_AGAINST_COMMITTED)�manager_of_class)� NEVER_SET)�NO_AUTOFLUSH)� NO_CHANGE)�NO_RAISE)�NO_VALUE)�NON_PERSISTENT_OK)�PASSIVE_NO_FETCH)�PASSIVE_NO_FETCH_RELATED)�PASSIVE_NO_INITIALIZE)�PASSIVE_NO_RESULT)�PASSIVE_OFF)�PASSIVE_ONLY_PERSISTENT)�PASSIVE_RETURN_NEVER_SET)�RELATED_OBJECT_OK)�SQL_OK)� state_str� )�event)� inspection)�utilc @ s� e Zd ZdZdZd-dd�Zejdd� �Ze dd � �Z efd d�Zdd � Z ejdd� �Zejdd� �Ze dd� �Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd.d%d&�Zd'd(� Zd)d*� Zejd+d,� �Z dS )/�QueryableAttributea� Base class for :term:`descriptor` objects that intercept attribute events on behalf of a :class:`.MapperProperty` object. The actual :class:`.MapperProperty` is accessible via the :attr:`.QueryableAttribute.property` attribute. .. seealso:: :class:`.InstrumentedAttribute` :class:`.MapperProperty` :attr:`.Mapper.all_orm_descriptors` :attr:`.Mapper.attrs` TNc C sr || _ || _|| _|| _|| _|| _t|�}|rnx<|jD ]2}||kr8| j� || j� || jj r8d| j_ q8W d S )NT)�class_�key�impl� comparator� _parententity�_of_typer Z_bases�dispatchZ_update�_active_history) �selfr$ r% r&