관리-도구
편집 파일: dependency.cpython-311.pyc
� �܋fܵ � �* � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm Z dd lmZ d dlmZ d dlm Z d dlmZ G d� d e� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Zeee ee eiZdS )zRelationship dependencies. � )� attributes)�exc)�sync)� unitofwork)�util)� MANYTOMANY)� MANYTOONE)� ONETOMANY� )�sqlc � � e Zd Zd� Zed� � � Zd� Zd� Zd� Zd� Z d� Z d� Zd � Zd � Z d� Zd� Zd � Zd� Zdd�Zd� Zd� ZdS )�DependencyProcessorc � � || _ |j | _ |j | _ |j | _ |j | _ |j | _ |j | _ |j | _ |j | _ |j | _ | j rt j | _ nt j | _ | j rt j | _ nt j | _ |j | _ | j j st# j d| j z � � �d S )Nz|Can't build a DependencyProcessor for relationship %s. No target attributes to populate between parent and child are present)�prop�cascade�mapper�parent� secondary� direction�post_update�passive_deletes�passive_updates�enable_typechecksr �PASSIVE_NO_INITIALIZE�_passive_delete_flag�PASSIVE_OFF�_passive_update_flag�key�synchronize_pairs�sa_exc� ArgumentError)�selfr s �P/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/orm/dependency.py�__init__zDependencyProcessor.__init__ s� � ��� ��|����k����k������������+���#�3���#�3���!%�!7����� ?�(2�(H�D�%�%�(2�(>�D�%��� ?�(2�(H�D�%�%�(2�(>�D�%��8����y�*� ��&�$�&*�i�0�� � � � � c �6 � t |j |� � S �N)�_direction_to_processorr )�clsr s r# �from_relationshipz%DependencyProcessor.from_relationship6 s � �&�t�~�6�t�<�<�<r% c �p � | j j � | j � � � |� � S )z�return True if the given object instance has a parent, according to the ``InstrumentedAttribute`` handled by this ``DependencyProcessor``. )r � class_manager�get_implr � hasparent�r"