관리-도구
편집 파일: session.cpython-37.pyc
B ��4]� � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm Z dd lmZ ddl mZ ddl mZ dd l mZ ddl mZ ddl mZ ddl mZ ddl mZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddddgZ!e�"� Z#dd� Z$G d d!� d!e%�Z&e�'d"�Z(e�'d#�Z)e�'d$�Z*e�'d%�Z+e�'d&�Z,G d'd� de%�Z-G d(d� de&�Z.G d)d� de&�Z/d*d+� Z0d,d-� Z1d.d/� Z2d0d1� Z3e�4� Z5dS )2z1Provides the Session class and related utilities.� N� )� attributes)�exc)�identity)�loading)�persistence)�query)�state)�_class_to_mapper)� _none_set)� _state_mapper)�instance_str)� object_mapper)�object_state)� state_str)�SessionExtension)�UOWTransaction� )�engine)�sql)�util)�inspect)� expression�Session�SessionTransactionr �sessionmakerc C s* | j r&y t| j S tk r$ Y nX dS )z_Given an :class:`.InstanceState`, return the :class:`.Session` associated, if any. N)� session_id� _sessions�KeyError)r � r �I/opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/orm/session.py�_state_session. s r! c @ sJ e Zd ZdZee�dd�dd� ��Zee�d�dd� ��Z ed d � �Z dS )�_SessionClassMethodszBClass-level methods for :class:`.Session`, :class:`.sessionmaker`.z1.3z�The :meth:`.Session.close_all` method is deprecated and will be removed in a future release. Please refer to :func:`.session.close_all_sessions`.c C s t � dS )zClose *all* sessions in memory.N)�close_all_sessions)�clsr r r � close_all= s z_SessionClassMethods.close_allzsqlalchemy.orm.utilc O s |j ||�S )zZReturn an identity key. This is an alias of :func:`.util.identity_key`. )�identity_key)r$ Zorm_util�args�kwargsr r r r&