#NEWLINE# def execute( self , statement , args = None ) : #NEWLINE# #INDENT# "Prepares and executes a database operation (query or command).\n\n    Args:\n      statement: A string, a SQL statement.\n      args: A sequence or mapping of arguments matching the statement's bind\n        variables, if any.\n\n    Raises:\n      InterfaceError: Unknown type used as a bind variable.\n      DatabaseError: A SQL exception occurred.\n      OperationalError: RPC problem.\n    " #NEWLINE# self . _CheckOpen ( ) #NEWLINE# self . _Reset ( ) #NEWLINE# request = sql_pb2 . ExecRequest ( ) #NEWLINE# request . options . include_generated_keys = True #NEWLINE# if ( statement is not None ) : #NEWLINE# #INDENT# if ( not hasattr ( args , '__iter__' ) ) : #NEWLINE# #INDENT# args = [ args ] #NEWLINE# #UNINDENT# self . _AddBindVariablesToRequest ( statement , args , request . bind_variable . add ) #NEWLINE# #UNINDENT# request . statement = _ConvertFormatToQmark ( statement , args ) #NEWLINE# self . _DoExec ( request ) #NEWLINE# self . _executed = request . statement