#NEWLINE# @ classmethod #NEWLINE# def _init_statement( cls , dialect , connection , dbapi_connection , statement , parameters ) : #NEWLINE# #INDENT# 'Initialize execution context for a string SQL statement.' #NEWLINE# self = cls . __new__ ( cls ) #NEWLINE# self . dialect = dialect #NEWLINE# self . root_connection = connection #NEWLINE# self . _dbapi_connection = dbapi_connection #NEWLINE# self . engine = connection . engine #NEWLINE# self . execution_options = connection . _execution_options #NEWLINE# if ( not parameters ) : #NEWLINE# #INDENT# if self . dialect . positional : #NEWLINE# #INDENT# self . parameters = [ dialect . execute_sequence_format ( ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . parameters = [ { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ] #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( parameters [ 0 ] , dialect . execute_sequence_format ) : #NEWLINE# #INDENT# self . parameters = parameters #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( parameters [ 0 ] , dict ) : #NEWLINE# #INDENT# if dialect . supports_unicode_statements : #NEWLINE# #INDENT# self . parameters = parameters #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . parameters = ( [ dict ( ( ( dialect . _encoder ( k ) [ 0 ] , d [ k ] ) for k in d ) ) for d in parameters ] or [ { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . parameters = [ dialect . execute_sequence_format ( p ) for p in parameters ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . executemany = ( len ( parameters ) > 1 ) #NEWLINE# if ( ( not dialect . supports_unicode_statements ) and isinstance ( statement , util . text_type ) ) : #NEWLINE# #INDENT# self . unicode_statement = statement #NEWLINE# self . statement = dialect . _encoder ( statement ) [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . statement = self . unicode_statement = statement #NEWLINE# #UNINDENT# self . cursor = self . create_cursor ( ) #NEWLINE# return self