Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/sqlalchemy/orm/__pycache__/strategy_options.cpython-39.pyc
Ðазад
a _�h�� � @ s d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm Z ddlmZ dd lm Z dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ G dd� dee�ZG dd� de�ZG dd� de �Z!e!� dSdd��Z"e"j#dd� �Z"e!� d d!� �Z$e$j#d"d!� �Z$e!� dTd#d$��Z%e%j#d%d$� �Z%e%j&d&d'� �Z'e!� d(d)� �Z(e(j#d*d)� �Z(e(j&d+d,� �Z)e!� d-d.� �Z*e*j#d/d.� �Z*e*j&d0d1� �Z+e!� d2d3� �Z,e,j#d4d3� �Z,e,j&d5d6� �Z-e!� d7d8� �Z.e.j#d9d8� �Z.e!� d:d;� �Z/e/j#d<d;� �Z/e!� dUd>d?��Z0e0j#d@d?� �Z0e!� dAdB� �Z1e1j#dCdB� �Z1e!� dDdE� �Z2e2j#dFdE� �Z2e!� dGdH� �Z3e3j#dIdH� �Z3e!� dJdK� �Z4e4j#dLdK� �Z4e!� dMdN� �Z5e5j#dOdN� �Z5e!� dPdQ� �Z6e6j#dRdQ� �Z6dS )Vz � )�util)�QueryableAttribute)�_class_to_mapper)�_is_aliased_class)�_is_mapped_class)�InspectionAttr)�MapperOption)�MapperProperty)�PropComparator)�_DEFAULT_TOKEN)�_WILDCARD_TOKEN)�PathRegistry)� TokenRegistry)�_orm_full_deannotate� )�exc��inspect)� expression)�_generative)� Generativec s� e Zd ZdZdd� Zedd� �Zdd� Z� fdd �Zd Z d Z dZd ZdZ dd � Zdd� Zdd� Zd1dd�Zdd� Zdd� Zdd� Zedd� �Zed2dd��Zed3dd ��Zed!d"� �Zed#d$� �Zd4d%d&�Zd5d'd(�Zd)d*� Zd+d,� Zd-d.� Zd/d0� Z � Z!S )6�Loada� Represents loader options which modify the state of a :class:`_query.Query` in order to affect how various mapped attributes are loaded. The :class:`_orm.Load` object is in most cases used implicitly behind the scenes when one makes use of a query option like :func:`_orm.joinedload`, :func:`.defer`, or similar. However, the :class:`_orm.Load` object can also be used directly, and in some cases can be useful. To use :class:`_orm.Load` directly, instantiate it with the target mapped class as the argument. This style of usage is useful when dealing with a :class:`_query.Query` that has multiple entities:: myopt = Load(MyClass).joinedload("widgets") The above ``myopt`` can now be used with :meth:`_query.Query.options`, where it will only take effect for the ``MyClass`` entity:: session.query(MyClass, MyOtherClass).options(myopt) One case where :class:`_orm.Load` is useful as public API is when specifying "wildcard" options that only take effect for a certain class:: session.query(Order).options(Load(Order).lazyload('*')) Above, all relationships on ``Order`` will be lazy-loaded, but other attributes on those descendant objects will load using their normal loader strategy. .. seealso:: :ref:`deferred_options` :ref:`deferred_loading_w_multiple` :ref:`relationship_loader_options` c C s* t |�}|j| _t�� | _i | _d| _d S �NF)r Z_path_registry�pathr �OrderedDict�context� local_opts�is_class_strategy)�self�entityZinsp� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/sqlalchemy/orm/strategy_options.py�__init__L s z Load.__init__c C s&