File: //lib/python3/dist-packages/django/db/backends/base/__pycache__/base.cpython-310.pyc
o
3�a�` � @ s� d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ d dl Z d dl
mZ d dlm
Z
d dlmZmZ d dlmZ d dlmZ d d lmZ d d
lmZ d dlmZ d dlmZ d d
lmZ d dlm Z dZ!G dd� d�Z"dS )� N)�deque)�contextmanager)�settings)�ImproperlyConfigured)�DEFAULT_DB_ALIAS�
DatabaseError)�utils)�BaseDatabaseValidation)�connection_created)�TransactionManagementError��DatabaseErrorWrapper)�timezone)�async_unsafe)�cached_property� __no_db__c @ s~ e Zd ZdZi Zi Zi ZdZdZdZ dZ
dZdZdZ
dZdZeZdZefdd�Zdd� Zed d
� �Zedd� �Zed
d� �Zedd� �Zdd� Zdd� Zdd� Zd|dd�Ze dd� �Z!dd� Z"e dd� �Z#dd � Z$d|d!d"�Z%d#d$� Z&d%d&� Z'd'd(� Z(e d)d*� �Z)e d+d,� �Z*e d-d.� �Z+e d/d0� �Z,d1d2� Z-d3d4� Z.d5d6� Z/d7d8� Z0e d9d:� �Z1e d;d<� �Z2e d=d>� �Z3e d?d@� �Z4dAdB� Z5dCdD� Z6d}dFdG�Z7dHdI� Z8dJdK� Z9dLdM� Z:dNdO� Z;e<dPdQ� �Z=dRdS� Z>dTdU� Z?d|dVdW�Z@dXdY� ZAdZd[� ZBed\d]� �ZCd^d_� ZDd`da� ZEdbdc� ZFddde� ZGedfdg� �ZHdhdi� ZIdjdk� ZJdldm� ZKe<dndo� �ZLe<dpdq� �ZMdrds� ZNdtdu� ZOdvdw� ZPe<dxdy� �ZQd|dzd{�ZRdS )~�BaseDatabaseWrapperz Represent a database connection.N�unknowni(# c C s� d | _ || _|| _t| jd�| _d| _d| _d| _d| _ g | _
d| _d| _d | _
d| _d| _t�� | _d| _t�� | _g | _d| _g | _| �| �| _| �| �| _| �| �| _| � | �| _!| �"| �| _#| �$| �| _%d S )N)�maxlenFr T)&�
connection�
settings_dict�aliasr �
queries_limit�queries_log�force_debug_cursor�
autocommit�in_atomic_block�savepoint_state�
savepoint_ids�commit_on_exit�needs_rollback�close_at�closed_in_transaction�errors_occurred� threading�Lock�_thread_sharing_lock�_thread_sharing_count�_thread� get_ident�
_thread_ident�
run_on_commit�%run_commit_hooks_on_set_autocommit_on�execute_wrappers�client_class�client�creation_class�creation�features_class�features�introspection_class�
introspection� ops_class�ops�validation_class�
validation)�selfr r � r; �>/usr/lib/python3/dist-packages/django/db/backends/base/base.py�__init__0 s4
zBaseDatabaseWrapper.__init__c C � dS )z
Ensure the connection's timezone is set to `self.timezone_name` and
return whether it changed or not.
Fr; �r: r; r; r<