HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/orm/__pycache__/__init__.cpython-37.pyc
B

��4]F%�@stdZddlmZddlmZddlmZddlmZddlmZddlm	Z	ddl
mZdd	l
mZdd
l
m
Z
ddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddl#m$Z$ddl%m&Z&ddl%m'Z'ddl%m(Z(dd l%m)Z)dd!l%m*Z*dd"l%m+Z+dd#lm,Z,dd$l-m.Z.dd%l-m/Z/dd&l-m0Z0dd'l-m1Z1dd(l-m2Z2dd)l-m3Z3dd*l-m4Z4dd+l-m5Z5d,d-lm6Z7d,d.lm-Z8d,d/l9m:Z:dQd1d2�Z;e:e!d3�Z<d4d5�Z=d6d7�Z>e:ed8�Z?e:ed9�Z@d:d;�ZAd<d=�ZBd>d?�ZCe:ed@�Ze:e
dA�ZDe:edB�ZEe8jFdCdDdE�dFdG��ZGdHdI�ZHejIjJZIejIjKZLejMjJZMejNjJZNejOjJZOejPjJZPejQjJZQejRjJZRejSjJZSejTjKZTejUjJZUejVjKZVejWjJZWejXjKZXejYjJZYejZjJZZej[jJZ[ej\jJZ\ej]jJZ]dJdK�Z^dLdM�Z_e:edN�Z`dOdP�Zaeaeb��d0S)Rz�
Functional constructs for ORM configuration.

See the SQLAlchemy object relational tutorial and mapper configuration
documentation for an overview of how this module is used.

�)�exc)�mapper)�strategy_options)�AttributeExtension)�MapperExtension)�SessionExtension)�ComparableProperty)�CompositeProperty)�SynonymProperty)�EXT_CONTINUE)�EXT_SKIP)�EXT_STOP)�PropComparator)�_mapper_registry)�class_mapper)�configure_mappers)�Mapper)�
reconstructor)�	validates)�ColumnProperty)�AliasOption)�Bundle)�Query)�foreign)�RelationshipProperty)�remote)�scoped_session)�close_all_sessions)�make_transient)�make_transient_to_detached)�object_session)�Session)�sessionmaker)�Load)�aliased)�join)�
object_mapper)�	outerjoin)�polymorphic_union)�was_deleted)�with_parent)�with_polymorphic�)�sql)�util)�public_factoryNcKs6|�dd�|�dd�|�dd�tfd|i|��S)a�Create a new :class:`.Session`
    with no automation enabled by default.

    This function is used primarily for testing.   The usual
    route to :class:`.Session` creation is via its constructor
    or the :func:`.sessionmaker` function.

    :param bind: optional, a single Connectable to use for all
      database access in the created
      :class:`~sqlalchemy.orm.session.Session`.

    :param \*\*kwargs: optional, passed through to the
      :class:`.Session` constructor.

    :returns: an :class:`~sqlalchemy.orm.session.Session` instance

    The defaults of create_session() are the opposite of that of
    :func:`sessionmaker`; ``autoflush`` and ``expire_on_commit`` are
    False, ``autocommit`` is True.  In this sense the session acts
    more like the "classic" SQLAlchemy 0.3 session with these.

    Usage::

      >>> from sqlalchemy.orm import create_session
      >>> session = create_session()

    It is recommended to use :func:`sessionmaker` instead of
    create_session().

    Z	autoflushFZ
autocommitTZexpire_on_commit�bind)�
setdefaultr!)r0�kwargs�r3�J/opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/orm/__init__.py�create_session?sr5z.orm.relationshipcOs
t||�S)z#A synonym for :func:`relationship`.)�relationship)�arg�kwr3r3r4�relationgsr9cKsd|d<t|f|�S)aiConstruct a dynamically-loading mapper property.

    This is essentially the same as
    using the ``lazy='dynamic'`` argument with :func:`relationship`::

        dynamic_loader(SomeClass)

        # is the same as

        relationship(SomeClass, lazy="dynamic")

    See the section :ref:`dynamic_relationship` for more details
    on dynamic loading.

    �dynamicZlazy)r6)Zargumentr8r3r3r4�dynamic_loadermsr;z.orm.column_propertyz.orm.compositecKs||fS)a�Create a back reference with explicit keyword arguments, which are the
    same arguments one can send to :func:`relationship`.

    Used with the ``backref`` keyword argument to :func:`relationship` in
    place of a string argument, e.g.::

        'items':relationship(
            SomeItem, backref=backref('parent', lazy='subquery'))

    .. seealso::

        :ref:`relationships_backref`

    r3)�namer2r3r3r4�backref�sr=cOst|ddi|��S)a�Indicate a column-based mapped attribute that by default will
    not load unless accessed.

    :param \*columns: columns to be mapped.  This is typically a single
     :class:`.Column` object, however a collection is supported in order
     to support multiple columns mapped under the same attribute.

    :param \**kw: additional keyword arguments passed to
     :class:`.ColumnProperty`.

    .. seealso::

        :ref:`deferred`

    �deferredT)r)�columnsr8r3r3r4r>�sr>cCstt���}d|_|S)z�Indicate an attribute that populates from a query-time SQL expression.

    .. versionadded:: 1.2

    .. seealso::

        :ref:`mapper_query_expression`

    ))�query_expressionT)r�_sqlZnullZstrategy_key)Zpropr3r3r4r@�s
r@z.orm.mapperz.orm.synonymz.orm.comparable_propertyz0.7zv:func:`.compile_mappers` is deprecated and will be removed in a future release.  Please use :func:`.configure_mappers`)�messagecCs
t�dS)zZInitialize the inter-mapper relationships of all mappers that have
    been defined.

    N)rr3r3r3r4�compile_mappers�s
rCcCsXtj��z<x6trByt��\}}|��Wqtk
r>YqXqWWdtj��XdS)aRemove all mappers from all classes.

    This function removes all instrumentation from classes and disposes
    of their associated mappers.  Once called, the classes are unmapped
    and can be later re-mapped with new mappers.

    :func:`.clear_mappers` is *not* for normal use, as there is literally no
    valid usage for it outside of very specific testing scenarios. Normally,
    mappers are permanent structural components of user-defined classes, and
    are never discarded independently of their class.  If a mapped class
    itself is garbage collected, its mapper is automatically disposed of as
    well. As such, :func:`.clear_mappers` is only for usage in test suites
    that re-use the same classes with different mappings, which is itself an
    extremely rare use case - the only such use case is in fact SQLAlchemy's
    own test suite, and possibly the test suites of other ORM extension
    libraries which intend to test various combinations of mapper construction
    upon a fixed set of classes.

    N)�	mapperlibZ_CONFIGURE_MUTEX�acquirer�popitemZdispose�KeyError�release)r�br3r3r4�
clear_mappers�s
rJcOs
t||�S)z#A synonym for :func:`joinedload()`.)�
joinedload)�argsr2r3r3r4�	eagerloadsrMcOs
t||�S)z&A synonym for :func:`joinedload_all()`)�joinedload_all)rLr2r3r3r4�
eagerload_allsrOz.orm.contains_aliascsnddlm}ddlm}ddlm}ddlm}ddl�t�fdd	�|��D��at	j
�d
�t	j
�d�dS)Nr,)r.r)r:)�events)�loading�c3s*|]"\}}|�d�s��|�s|VqdS)�_N)�
startswithZismodule)�.0r<�obj)�_inspectr3r4�	<genexpr>sz__go.<locals>.<genexpr>zsqlalchemy.ormzsqlalchemy.ext)�r.r:rPrQ�inspect�sorted�items�__all__�_sa_utilZdependenciesZresolve_all)ZlclsZsa_utilr:rPrQr3)rWr4�__gos
r_)N)c�__doc__rYrrrDrZdeprecated_interfacesrrrZdescriptor_propsrr	r
Z
interfacesrrr
rrrrrrrZ
propertiesrZqueryrrrZ
relationshipsrrrZscopingrZsessionrrrr r!r"r#r.r$r%r&r'r(r)r*r+r-rAr^Zutil.langhelpersr/r5r6r9r;Zcolumn_propertyZ	compositer=r>r@ZsynonymZcomparable_propertyZ
deprecatedrCrJrKZ_unbound_fnZ_unbound_all_fnrNZcontains_eagerZdeferZundeferZ
undefer_groupZwith_expressionZ	load_onlyZlazyloadZlazyload_allZsubqueryloadZsubqueryload_allZselectinloadZselectinload_allZ
immediateloadZnoloadZ	raiseloadZdefaultloadZselectin_polymorphicrMrOZcontains_aliasr_�localsr3r3r3r4�<module>s�
%




!