관리-도구
편집 파일: strategies.cpython-38.pyc
U -?�fK� � @ s� d Z ddlmZ ddlZddlZddlmZ ddlmZ ddlmZ ddlm Z dd l mZ dd l mZ ddl mZ ddl mZ dd l mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" ddlm#Z# ddlm$Z$ ddlm%Z% dd l&m'Z' dd!l(m)Z) dd"l*m+Z+ dd#lm,Z, dd$lm-Z- d%d&l m.Z. d%d l mZ/ d%d'l m0Z0 d%d(l m1Z1 d%d)l m2Z2 d%dl mZ d%dl2mZ3 d%d*l2m4Z4 d%d+l5m6Z6 d%d,l5m7Z7 e �r6dd-lm8Z8 d%d.l9m:Z: dbd0d1�Z;ej<j=d/d/d2�G d3d4� d4e$��Z>e1j?ej<j=d5d/d2�G d6d7� d7e$���Z@e1j?ej<j=d5d8�G d9d:� d:e@���ZAe1j?ej<j=d5d5d;�ej<j=d5d5d5d<�ej<j=d5d=�G d>d?� d?e$�����ZBG d@dA� dA�ZCG dBdC� dCe$�ZDe1j?ej8j=d5d=�G dDdE� dEe$���ZEe1j?ej8j=dFdG�ej8j=ddG�G dHdI� dIeD����ZFe1j?ej8j=d5dG�ej8j=dJdG�ej8j=dKdG�ej8j=dLdG�ej8j=dMdG�G dNdO� dOeDejGe1jH�������ZIG dPdQ� dQ�ZJG dRdS� dSeD�ZKej8j=dTdG�G dUdV� dVeK��ZLe1j?ej8j=dWdG�G dXdY� dYeK���ZMe1j?ej8j=dZdG�ej8j=d/dG�G d[d\� d\eD����ZNe1j?ej8j=d]dG�G d^d_� d_eKejG���ZOd`da� ZPdS )czWsqlalchemy.orm.interfaces.LoaderStrategy implementations, and related MapperOptions.� )�annotationsN)�Any)�Dict)�Tuple)� TYPE_CHECKING� )� attributes)�exc)� interfaces)�loading)� path_registry)� properties)�query)� relationships)� unitofwork)�util)�_DEFER_FOR_STATE)�_RAISE_FOR_STATE)�_SET_DEFERRED_EXPIRED)�ATTR_WAS_SET)�LoaderCallableStatus)�PASSIVE_OFF)�PassiveFlag)�_column_descriptions)�ORMCompileState)�ORMSelectCompileState)�QueryContext)�LoaderStrategy)�StrategizedProperty)�_state_session)� InstanceState)�Load)� _none_set)�AliasedClass� )�event)�inspect)�log)�sql)�visitors)�LABEL_STYLE_TABLENAME_PLUS_COL)�Select)�RelationshipProperty)� ColumnElementFc s" g } |o| j �|r"| jr"| �t� | j| jjkrV| jj| j \��| ���fdd�� |rf| �tj� |r�| j � � r�| j r�| �� �fdd�� |jD ]�}| |j� | j�kr�|j�| j�s�tj|j| jf| �|||o�| jp�| jtjk||||| p�| j | jd�| ��}| D ]} | || � �q q�d S )Nc s t j| |j� f��S �N)�orm_utilZ_validator_events�key��desc�prop)�fn�opts� �I/opt/hc_python/lib64/python3.8/site-packages/sqlalchemy/orm/strategies.py�<lambda>X s ��z%_register_attribute.<locals>.<lambda>c s t �| � ��S r. )r Zbackref_listenersr1 )�backref�uselistr6 r7 r8 f s �)Zparent_tokenr: �compare_function� useobjectZtrackparent�typecallable� callable_�active_history� impl_classZsend_modified_events�doc)r: Z single_parent�append�single_parent_validatorr0 �parentZ validatorsr Ztrack_cascade_eventsZback_populatesZ_effective_sync_backrefZself_and_descendants�_props�get� class_managerZ_attr_has_implr Zregister_attribute_impl�class_� directionr Z ONETOMANYZviewonlyrA )r3 �mapperr<