

def insert_many(self, columns, values):
    try:
        conn = self.get_conn()
        cur = conn.cursor()
        parameters = ','.join((['?'] * len(columns)))
        sql = 'INSERT OR IGNORE INTO {table} ({columns}) VALUES ({values})'.format(table=self.table_name, columns=', '.join(columns), values=parameters)
        cur.executemany(sql, values)
        conn.commit()
    except sqlite3.Error as e:
        logging.error('Error inserting into {0}: {1}'.format(self.table_name, e.args[0]))
    finally:
        cur.close()

dataset/ETHPy150Open datamachine/telex/telex/DatabaseMixin.py DatabaseMixin.insert_many/original