/usr/lib/python3/dist-packages/twisted/enterprise/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/enterprise/__pycache__/adbapi.cpython-310.pyc (15876B)
o
bA @ sf d Z ddlmZ ddlmZmZ G dd deZG dd dZG dd d Z G d
d dZ
d dgZdS )
zg
An asynchronous mapping to U{DB-API
2.0
}.
)threads)logreflectc @ s e Zd ZdZdS )ConnectionLostzb
This exception means that a db connection has been lost. Client code may
try again.
N)__name__
__module____qualname____doc__ r
r
;/usr/lib/python3/dist-packages/twisted/enterprise/adbapi.pyr s r c @ s8 e Zd ZdZdd Zdd Zdd Zdd Zd
d ZdS )
Connectiona
A wrapper for a DB-API connection instance.
The wrapper passes almost everything to the wrapped connection and so has
the same API. However, the L{Connection} knows about its pool and also
handle reconnecting should when the real connection dies.
c C s || _ d | _| d S N)_pool_connection reconnect)selfpoolr
r
r __init__ zConnection.__init__c C s d S r
r
r r
r
r close$ s zConnection.closec C s | j js| j d S z| j | j }|| j j | | j W d S t y7 t
d d Y nw | j | j | j j
rHt
d t )NRollback failedzConnection lost.)r r r rollbackcursorexecutegood_sqlr commit
BaseExceptionr err
disconnectnoisymsgr )r cursr
r
r r . s"
zConnection.rollbackc C s( | j d ur| j| j | j | _ d S r
)r r r connectr r
r
r r D s
zConnection.reconnectc C t | j|S r
)getattrr r namer
r
r __getattr__I zConnection.__getattr__N) r r r r r r r r r( r
r
r
r r s
r c @ s<