#NEWLINE# @ cached_property #NEWLINE# def supports_transactions( self ) : #NEWLINE# #INDENT# 'Confirm support for transactions' #NEWLINE# try : #NEWLINE# #INDENT# self . connection . enter_transaction_management ( ) #NEWLINE# cursor = self . connection . cursor ( ) #NEWLINE# cursor . execute ( 'CREATE TABLE ROLLBACK_TEST (X INT)' ) #NEWLINE# self . connection . commit ( ) #NEWLINE# cursor . execute ( 'INSERT INTO ROLLBACK_TEST (X) VALUES (8)' ) #NEWLINE# self . connection . rollback ( ) #NEWLINE# cursor . execute ( 'SELECT COUNT(X) FROM ROLLBACK_TEST' ) #NEWLINE# ( count , ) = cursor . fetchone ( ) #NEWLINE# cursor . execute ( 'DROP TABLE ROLLBACK_TEST' ) #NEWLINE# self . connection . commit ( ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# self . connection . leave_transaction_management ( ) #NEWLINE# #UNINDENT# return ( count == 0 )