def insert(self, query, params=None):
        cursor = self.conn.cursor()
        self.log.debug(query + ' ' + repr(params))
        try:
            if params:
                cursor.execute("insert " + query, params)
            else:
                cursor.execute("insert " + query)
        except Exception, e:
            self.conn.rollback()
            raise Exception(str(e) + '\n%s\n%s' % (query, repr(params)))
        else:
            new_id = cursor.lastrowid
            self.conn.commit()
            return new_id
:param sources: Source code files to build. Paths are relative to the BUILD
dataset/ETHPy150Open shinymud/ShinyMUD/src/shinymud/lib/db.py/DB.insert--crossover with--dataset/ETHPy150Open pantsbuild/pants/contrib/cpp/src/python/pants/contrib/cpp/targets/cpp_target.py/CppTarget.__init__