#NEWLINE# def is_a_write_query( self , query ) : #NEWLINE# #INDENT# query = query . upper ( ) #NEWLINE# update_words = [ 'CREATE' , 'MERGE' , 'DELETE' , 'SET' , 'REMOVE' , 'DROP' ] #NEWLINE# unquoted = re . findall ( '(?:^|"|\'|`)([^"|\'|`]*)(?:$|"|\'|`)' , query , flags = re . DOTALL ) #NEWLINE# unquoted = ( ( ' ' + '' . join ( unquoted ) ) + ' ' ) #NEWLINE# unquoted = unquoted . replace ( '\n' , ' ' ) #NEWLINE# unquoted = unquoted . replace ( '\r' , ' ' ) #NEWLINE# unquoted = unquoted . replace ( '\t' , ' ' ) #NEWLINE# sightings = [ unquoted . find ( ( ( ' ' + word ) + ' ' ) ) for word in update_words ] #NEWLINE# return any ( [ ( x > ( - 1 ) ) for x in sightings ] )