관리-도구
편집 파일: base.cpython-311.pyc
� �܋f�; � �t � d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ej d d � � Z ej dd� � Z ej d d� � Z ej dd� � Z ej dd� � Z ej dd� � Z ej ddd�� � Z ej ddd�� � Z ej ddd�� � Z ej ddd�� � Z ej dd d!�� � Z ej d"d#d$�� � Z ej d%d&d'�� � Z ej d(d)d*�� � Z ej d+d,d-�� � Z ej d.d/eez ez ez ez �� � Z ej d0d1eez �� � Z ej d2d3eez �� � Z ej d4d5eez �� � Z ej d6d7eez �� � Z ej d8d9eez �� � Zd:Zd;Z d<Z! ej d=� � Z" ej d>� � Z# ej d?� � Z$ ej d@dA� � Z% ej dBdC� � Z& ej dDdE� � Z' ej dFdG� � Z( e)eg� � Z* e)dee g� � Z+ ej dH� � Z, ej dI� � Z-dJ� Z.dK� Z/ ej0 e � � Z1 ej0 dL� � Z2dM� Z3dN� Z4dO� Z5dP� Z6dQ� Z7dR� Z8dS� Z9 ej: e;� � dT� � � Z<dU� Z=dV� Z>dW� Z?dX� Z@dY� ZAdZ� ZBd[� ZC ejD d\� � ZE ej: eF� � dgd^�� � ZGdhd`�ZH G da� dbe;� � ZI G dc� ddeI� � ZJ G de� dfe;� � ZKdS )iz=Constants and rudimental functions used throughout the ORM. � N� )�exc� )� inspection)�util)� expression�PASSIVE_NO_RESULTz�Symbol returned by a loader callable or other attribute/history retrieval operation when a value could not be determined, based on loader callable flags. �PASSIVE_CLASS_MISMATCHz�Symbol indicating that an object is locally present for a given primary key identity but it is not of the requested class. The return value is therefore None and no SQL should be emitted.�ATTR_WAS_SETz�Symbol returned by a loader callable to indicate the retrieved value, or values, were assigned to their attributes on the target object. � ATTR_EMPTYz@Symbol used internally to indicate an attribute had no callable.�NO_VALUEz�Symbol which may be placed as the 'previous' value of an attribute, indicating no value was loaded for an attribute when it was modified, and flags indicated we were not to load it. � NEVER_SETz�Symbol which may be placed as the 'previous' value of an attribute indicating that the attribute had not been assigned to previously. � NO_CHANGEz]No callables or SQL should be emitted on attribute access and no state should change )� canonical�CALLABLES_OKzELoader callables can be fired off if a value is not present. �SQL_OKzBLoader callables can emit SQL at least on scalar value attributes.�RELATED_OBJECT_OKzZCallables can use SQL to load related objects as well as scalar value attributes. � �INIT_OKz�Attributes should be initialized with a blank value (None or an empty collection) upon get, if no other value can be obtained. � �NON_PERSISTENT_OKz9Callables can be emitted if the parent is not persistent.� �LOAD_AGAINST_COMMITTEDzUCallables should use committed values as primary/foreign keys during a load. � �NO_AUTOFLUSHz*Loader callables should disable autoflush.�@ �NO_RAISEz0Loader callables should not raise any assertions� �PASSIVE_OFFz&Callables can be emitted in all cases.�PASSIVE_RETURN_NEVER_SETzPASSIVE_OFF ^ INIT_OK�PASSIVE_NO_INITIALIZEz'PASSIVE_RETURN_NEVER_SET ^ CALLABLES_OK�PASSIVE_NO_FETCHzPASSIVE_OFF ^ SQL_OK�PASSIVE_NO_FETCH_RELATEDzPASSIVE_OFF ^ RELATED_OBJECT_OK�PASSIVE_ONLY_PERSISTENTzPASSIVE_OFF ^ NON_PERSISTENT_OK�_sa_class_manager�_sa_instance_state)�mapper�instrumentor�EXT_CONTINUE�EXT_STOP�EXT_SKIP� ONETOMANYz�Indicates the one-to-many direction for a :func:`_orm.relationship`. This symbol is typically used by the internals but may be exposed within certain API features. � MANYTOONEz�Indicates the many-to-one direction for a :func:`_orm.relationship`. This symbol is typically used by the internals but may be exposed within certain API features. � MANYTOMANYz�Indicates the many-to-many direction for a :func:`_orm.relationship`. This symbol is typically used by the internals but may be exposed within certain API features. � NOT_EXTENSIONz�Symbol indicating an :class:`InspectionAttr` that's not part of sqlalchemy.ext. Is assigned to the :attr:`.InspectionAttr.extension_type` attribute. �SET_DEFERRED_EXPIRED�DEFER_FOR_STATEc �6 � � t j � fd�� � }|S )z1Mark a method as generative, e.g. method-chained.c � �� |d � � � }�D ]} ||| j � � � | |g|dd � �R i |�� |S )Nr r )�_clone�__name__)�fn�args�kw�self� assertion� assertionss ��J/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/orm/base.py�generatez_generative.<locals>.generate� si �� ��A�w�~�~����#� )� )�I��I�d�B�K�(�(�(�(� ��4�!�$�q�r�r�(�!�!�!�b�!�!�!��� )r � decorator)r; r= s ` r<