File: //usr/lib/python3/dist-packages/django/db/__pycache__/transaction.cpython-310.pyc
o
�a�/ � @ s� d dl mZmZ d dlmZmZmZmZmZ G dd� de�Z d*dd�Z
d*dd �Zd*d
d�Zd*dd
�Z
d*dd�Zd*dd�Zd*dd�Zd*dd�Zd*dd�Zd*dd�Zd*dd�Zed*dd��Zd*dd�ZG d d!� d!e�Zd+d$d%�Zd&d'� Zd*d(d)�ZdS ),� )�ContextDecorator�contextmanager)�DEFAULT_DB_ALIAS�
DatabaseError�Error�ProgrammingError�connectionsc @ s e Zd ZdZdS )�TransactionManagementErrorz*Transaction management is used improperly.N)�__name__�
__module__�__qualname__�__doc__� r r �7/usr/lib/python3/dist-packages/django/db/transaction.pyr s r Nc C s | du rt } t| S )z�
Get a database connection by name, or the default database connection
if no name is provided. This is a private API.
N)r r ��usingr r r �get_connection
s r c C � t | ��� S )z,Get the autocommit status of the connection.)r �get_autocommitr r r r r � r c C � t |��| �S )z,Set the autocommit status of the connection.)r �set_autocommit)�
autocommitr r r r r s r c C � t | ��� dS )zCommit a transaction.N)r �commitr r r r r ! � r c C r )zRoll back a transaction.N)r �rollbackr r r r r &