#NEWLINE# def _setup_crud_params( compiler , stmt , local_stmt_type , **kw ) : #NEWLINE# #INDENT# restore_isinsert = compiler . isinsert #NEWLINE# restore_isupdate = compiler . isupdate #NEWLINE# restore_isdelete = compiler . isdelete #NEWLINE# should_restore = ( ( restore_isinsert or restore_isupdate or restore_isdelete ) or ( len ( compiler . stack ) > 1 ) ) #NEWLINE# if ( local_stmt_type is ISINSERT ) : #NEWLINE# #INDENT# compiler . isupdate = False #NEWLINE# compiler . isinsert = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( local_stmt_type is ISUPDATE ) : #NEWLINE# #INDENT# compiler . isupdate = True #NEWLINE# compiler . isinsert = False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( local_stmt_type is ISDELETE ) : #NEWLINE# #INDENT# if ( not should_restore ) : #NEWLINE# #INDENT# compiler . isdelete = True #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# assert False , 'ISINSERT, ISUPDATE, or ISDELETE expected' #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# try : #NEWLINE# #INDENT# if ( local_stmt_type in ( ISINSERT , ISUPDATE ) ) : #NEWLINE# #INDENT# return _get_crud_params ( compiler , stmt , ** kw ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# if should_restore : #NEWLINE# #INDENT# compiler . isinsert = restore_isinsert #NEWLINE# compiler . isupdate = restore_isupdate #NEWLINE# compiler . isdelete = restore_isdelete