관리-도구
편집 파일: base.cpython-311.pyc
� �܋fpT � �| � d dl mZ d dlZd dlZddlmZ ddlmZ ddlmZ ddl m Z dd l mZ dd l mZ ddl mZ ddlm Z ddlmZ G d � de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� deej � � Z G d� de� � ZdS )� )�with_statementN� )�Connectable)�ExceptionContext)�_distill_params� )�exc)� interfaces)�log)�util)�schemac �> � e Zd ZdZ ej d� � Z d=d�Zd� Ze d� � � Z d� Zd� Zd � Z d � Zd� Ze d� � � Ze d � � � Ze d� � � Zd� Ze d� � � Zd� Ze d� � � Ze d� � � Ze d� � � Zd� Zd� Zd>d�Zd� Zd� Zd� Zd>d�Zd� Z d?d�Z!d?d�Z"d� Z#d � Z$d!� Z%d?d"�Z&d>d#�Z'd$� Z(d%� Z)d&� Z*d'� Z+d(� Z,d)� Z-d*� Z.d+� Z/d,� Z0d-� Z1d.� Z2d/� Z3d0� Z4d1� Z5d2� Z6d3� Z7d4� Z8d5� Z9d>d6�Z:d7� Z;dZ<dZ=d8� Z>e?d9� � � Z@d:� ZAd;� ZBd<� ZCdS )@� ConnectionaI Provides high-level functionality for a wrapped DB-API connection. Provides execution support for string-based SQL statements as well as :class:`_expression.ClauseElement`, :class:`.Compiled` and :class:`.DefaultGenerator` objects. Provides a :meth:`begin` method to return :class:`.Transaction` objects. The Connection object is **not** thread-safe. While a Connection can be shared among threads using properly synchronized access, it is still possible that the underlying DBAPI connection may not support shared access between threads. Check the DBAPI documentation for details. The Connection object represents a single DBAPI connection checked out from the connection pool. In this state, the connection pool has no affect upon the connection, including its expiration or timeout state. For the connection pool to properly manage connections, connections should be returned to the connection pool (i.e. ``connection.close()``) whenever the connection is not in use. .. index:: single: thread safety; Connection NFc � � || _ |j | _ || _ |du| _ |rA|| _ || _ |j | _ d| _ || _ |j | _ |j | _ n�|�|n|� � � | _ d| _ d| _ || _ d| _ d| _ | j � � � | _ |�$| j � |j � � | _ |p |du o|j | _ |rJ �|j | _ | j s| j j r"| j � | | j � � dS dS )z�Construct a new Connection. The constructor here is not public and is only called only by an :class:`_engine.Engine`. See :meth:`_engine.Engine.connect` and :meth:`_engine.Engine.contextual_connect` methods. NFr T)�engine�dialect�_Connection__branch_from�_Connection__branch�_Connection__connection�_execution_options�_echo�should_close_with_result�dispatch�_has_events�schema_for_object�raw_connection�_Connection__transaction�_Connection__savepoint_seq�_Connection__invalid�_Connection__can_reconnect�_should_log_info�_join�engine_connect)�selfr � connection�close_with_result�_branch_fromr � _dispatchr s �M/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/engine/base.py�__init__zConnection.__init__F sr � �"