#NEWLINE# @ classmethod #NEWLINE# def execute_raw( cls , query_string ) : #NEWLINE# #INDENT# '\n        ' #NEWLINE# logger . debug ( query_string ) #NEWLINE# post_data = { #NEWLINE# #INDENT# 'query' : query_string , #NEWLINE# #UNINDENT# } #NEWLINE# api = Client . instance ( ) . api #NEWLINE# result = [ ] #NEWLINE# try : #NEWLINE# #INDENT# start_time = time ( ) #NEWLINE# post_result = api . cursor . post ( data = post_data ) #NEWLINE# end_time = time ( ) #NEWLINE# calculated_time = ( ( end_time - start_time ) * 1000 ) #NEWLINE# time_result = ( '%s ms' % calculated_time ) #NEWLINE# logger_output = ( 'Query took %s' % time_result ) #NEWLINE# logger . debug ( logger_output ) #NEWLINE# result_dict_list = post_result [ 'result' ] #NEWLINE# for result_list in result_dict_list : #NEWLINE# #INDENT# if isinstance ( result_list , list ) : #NEWLINE# #INDENT# for result_dict in result_list : #NEWLINE# #INDENT# doc = create_document_from_result_dict ( result_dict , api ) #NEWLINE# result . append ( doc ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# result_dict = result_list #NEWLINE# doc = create_document_from_result_dict ( result_dict , api ) #NEWLINE# result . append ( doc ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except Exception as err : #NEWLINE# #INDENT# raise err #NEWLINE# #UNINDENT# return result