관리-도구
편집 파일: decl_api.cpython-38.pyc
U -?�f�� � @ s� d Z ddlmZ ddlZddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddlm Z dd lmZ dd lmZ ddlm Z ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" ddlm#Z# dd lm$Z$ dd!lm%Z% dd"l&m'Z' dd#l&m(Z( dd$l&m)Z) dd%l&m*Z* dd&l+m,Z, dd'l+m-Z- dd(l+m.Z. dd)l+m/Z/ dd*l+m0Z0 dd+l+m1Z1 dd,l+m2Z2 dd-l3m4Z4 dd.l3m5Z5 dd.l3m5Z6 dd/l7m8Z8 dd0l9m:Z: dd1l;m<Z< dd2l=m>Z> d3d4lm?Z? d3d5lm@Z@ d3d6lmAZA d3d7lBmCZC d3d8lDmEZE d3d9lFmGZG d3d:lHmIZI d3d;lJmKZK d3d<lAmLZL d3d=lAmMZM d3d>lAmZN d3d?lOmPZP d3d@lOmQZQ d3dAlOmRZR d3dBlOmSZS d3dClOmTZT d3dDlOmUZU d3dElOmVZV d3dFlOmWZW e�r�ddGlXmYZY ddHlXmZZZ ddIl+m[Z[ ddJlm\Z\ ddKlm]Z] dd2l=m>Z> d3dLl^m_Z_ d3dMl`maZa edNedO�ZbedPedO�ZceedQf Zde edQf ZeedRee)eb e*eb eGeb f f ZfdSdTdU�dVdW�ZgG dXdY� dYeh�ZiG dZd[� d[eie@jje8e �ZkeNjle:e<e4e5e"e#e e$e!f d\�G d]d^� d^ek��ZmG d_d`� d`ek�Znd�dbdTdcdd�dedf�ZoG dgdh� dh�ZpG didj� djepeeb �ZqG dkdl� dlejreb ep�ZsG dmdn� dneseb �ZtdododU�dpdq�ZudrdsdU�dtdu�ZvG dvdw� dwemdx�ZwG dydz� dze@jje>e ekdx�Zxdrdrdsd{�d|d}�ZyG d~d� de@jje>e �ZzdSdbd�dsd��d�d��Z{dde|d�dde/end��d�d�drdbd�d�d�drd�d�� d�d��Z}G d�d�� d��Z~e~Ze�s�e~ZZd�d�d��d�d��Z�e@��enexek�drd�dU�d�d���Z�dS )�z1Public API functions and helpers for declarative.� )�annotationsN)�Any)�Callable)�cast)�ClassVar)�Dict)� FrozenSet)�Generic)�Iterable)�Iterator)�Mapping)�Optional)�overload)�Set)�Tuple)�Type)� TYPE_CHECKING)�TypeVar)�Union� )� attributes)�clsregistry)�instrumentation)� interfaces)� mapperlib)� composite)�deferred)� mapped_column)�relationship)�synonym)�InstrumentedAttribute)�_inspect_mapped_class)�_is_mapped_class)�Mapped)� ORMDescriptor��_add_attribute)�_as_declarative)�_ClassScanMapperConfig)�_declarative_constructor)�_DeferredMapperConfig)�_del_attribute��_mapper)� Composite)�Synonym)�Mapper)�MappedColumn)�RelationshipProperty)� InstanceState� )�exc)� inspection)�util)�sqltypes)�_NoArg)�SQLCoreOperations)�MetaData)� FromClause)�hybridmethod)�hybridproperty)�typing)�CallableReference)�flatten_newtype)� is_generic)� is_literal)� is_newtype)� is_pep695)�Literal)�Self)�_O)� _RegistryType)�_DataclassArguments)�ClassManager)�MapperProperty)�_TypeEngineArgument)�_MatchedOnType�_T)�bound�_TTz_TypeEngineArgument[Any].�Type[_O]�bool��cls�returnc C s. | j dd� D ]}t|dd�dk r dS qdS )aK Given a class, return True if any of the classes it inherits from has a mapped table, otherwise return False. This is used in declarative mixins to build attributes that behave differently for the base class vs. a subclass in an inheritance hierarchy. .. seealso:: :ref:`decl_mixin_inheritance` r N� __table__TF)�__mro__�getattr)rU �class_� r[ �G/opt/hc_python/lib64/python3.8/site-packages/sqlalchemy/orm/decl_api.py�has_inherited_tablel s r] c @ s. e Zd Zdddd�dd�Zddd�dd �Zd S )�_DynamicAttributesType�strr �None)�key�valuerV c C s* d| j krt| ||� nt�| ||� d S �N� __mapper__)�__dict__r&