#NEWLINE# def execute( self , sql , * params ) : #NEWLINE# #INDENT# if isinstance ( sql , SelectCommand ) : #NEWLINE# #INDENT# self . last_select_command = sql #NEWLINE# self . rowcount = ( self . last_select_command . execute ( ) or ( - 1 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( sql , FlushCommand ) : #NEWLINE# #INDENT# sql . execute ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( sql , UpdateCommand ) : #NEWLINE# #INDENT# self . rowcount = sql . execute ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( sql , DeleteCommand ) : #NEWLINE# #INDENT# self . rowcount = sql . execute ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( sql , InsertCommand ) : #NEWLINE# #INDENT# self . connection . queries . append ( sql ) #NEWLINE# self . returned_ids = sql . execute ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise Database . CouldBeSupportedError ( "Can't execute traditional SQL: '%s' (although perhaps we could make GQL work)" , sql )