#NEWLINE# def get_insert_sql( self , rows ) : #NEWLINE# #INDENT# field_names_sql = '({0})' . format ( ', ' . join ( self . get_field_names ( ) ) ) #NEWLINE# row_values = [ ] #NEWLINE# sql_args = [ ] #NEWLINE# for row in rows : #NEWLINE# #INDENT# placeholders = [ ] #NEWLINE# for value in row : #NEWLINE# #INDENT# sql_args . append ( value ) #NEWLINE# placeholders . append ( '%s' ) #NEWLINE# #UNINDENT# row_values . append ( '({0})' . format ( ', ' . join ( placeholders ) ) ) #NEWLINE# #UNINDENT# row_values_sql = ', ' . join ( row_values ) #NEWLINE# self . sql = 'INSERT INTO {0} {1} VALUES {2}' . format ( self . tables [ 0 ] . get_identifier ( ) , field_names_sql , row_values_sql ) #NEWLINE# return ( self . sql , sql_args )