#NEWLINE# def last_executed_query( self , cursor , sql , params ) : #NEWLINE# #INDENT# if six . PY3 : #NEWLINE# #INDENT# return cursor . statement #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# query = cursor . statement #NEWLINE# return ( query if isinstance ( query , unicode ) else query . decode ( 'utf-8' ) )