29
29
__all__ = ("Transaction" , "ManagedTransaction" )
30
30
31
31
32
- class _AsyncTransactionBase :
32
+ class _TransactionBase :
33
33
def __init__ (self , connection , fetch_size , on_closed , on_error ):
34
34
self ._connection = connection
35
35
self ._error_handling_connection = ConnectionErrorHandler (
@@ -196,7 +196,7 @@ def _closed(self):
196
196
return self ._closed_flag
197
197
198
198
199
- class Transaction (_AsyncTransactionBase ):
199
+ class Transaction (_TransactionBase ):
200
200
""" Container for multiple Cypher queries to be executed within a single
201
201
context. :class:`Transaction` objects can be used as a context
202
202
managers (:py:const:`with` block) where the transaction is committed
@@ -207,32 +207,32 @@ class Transaction(_AsyncTransactionBase):
207
207
208
208
"""
209
209
210
- @wraps (_AsyncTransactionBase ._enter )
210
+ @wraps (_TransactionBase ._enter )
211
211
def __enter__ (self ):
212
212
return self ._enter ()
213
213
214
- @wraps (_AsyncTransactionBase ._exit )
214
+ @wraps (_TransactionBase ._exit )
215
215
def __exit__ (self , exception_type , exception_value , traceback ):
216
216
self ._exit (exception_type , exception_value , traceback )
217
217
218
- @wraps (_AsyncTransactionBase ._commit )
218
+ @wraps (_TransactionBase ._commit )
219
219
def commit (self ):
220
220
return self ._commit ()
221
221
222
- @wraps (_AsyncTransactionBase ._rollback )
222
+ @wraps (_TransactionBase ._rollback )
223
223
def rollback (self ):
224
224
return self ._rollback ()
225
225
226
- @wraps (_AsyncTransactionBase ._close )
226
+ @wraps (_TransactionBase ._close )
227
227
def close (self ):
228
228
return self ._close ()
229
229
230
- @wraps (_AsyncTransactionBase ._closed )
230
+ @wraps (_TransactionBase ._closed )
231
231
def closed (self ):
232
232
return self ._closed ()
233
233
234
234
235
- class ManagedTransaction (_AsyncTransactionBase ):
235
+ class ManagedTransaction (_TransactionBase ):
236
236
"""Transaction object provided to transaction functions.
237
237
238
238
Inside a transaction function, the driver is responsible for managing
0 commit comments