관리-도구
편집 파일: descriptor_props.cpython-37.pyc
B ��4])n � @ s4 d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm Z dd lmZ ddlm Z ddlmZ dd lmZ ddlmZ G dd� de�Zejjddd�G dd� de��Zejjddd�G dd� de��Zejjddd�G dd� de��Zejjddd�e�dd�G dd� de���ZdS )z�Descriptor properties are more "auxiliary" properties that exist as configurational elements, but don't participate as actively in the load/persist ORM loop. � )� attributes)� properties)�query)�MapperProperty)�PropComparator)� _none_set� )�event)�exc)�schema)�sql)�util)� expressionc @ s e Zd ZdZdZdd� ZdS )�DescriptorPropertyzS:class:`.MapperProperty` which proxies access to a user-defined descriptor.Nc s� ��G � �fdd�dt �}�jd krDt� j�jd �}� �|�rD|�_�jd kr��fdd�}�fdd�}�fdd�}t|||d ��_t��j��j j�j�j� �fd d��j �d�}|�j�|_� j� �j|� d S ) Nc sN e Zd ZdZdZdZe� �fdd��Zdd� Ze �d�rJe jf�fdd � Zd S )z7DescriptorProperty.instrument_class.<locals>._ProxyImplFTc s t � j�j�jjS )N)�getattr�class_�name�impl�uses_objects)�self)�mapper�prop� �R/opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/orm/descriptor_props.pyr * s zDDescriptorProperty.instrument_class.<locals>._ProxyImpl.uses_objectsc S s || _ d S )N)�key)r r r r r �__init__. s z@DescriptorProperty.instrument_class.<locals>._ProxyImpl.__init__�get_historyc s � � |||�S )N)r )r �state�dict_�passive)r r r r 3 s zCDescriptorProperty.instrument_class.<locals>._ProxyImpl.get_historyN) �__name__� __module__�__qualname__Zaccepts_scalar_loaderZexpire_missingZ collection�propertyr r �hasattrr �PASSIVE_OFFr r )r r r r � _ProxyImpl% s r&