code: def add_task_db(self, task, force=True):
          '''向数据库中写入一个新的任务记录, 并返回它的fid'''
          sql = '''INSERT INTO upload (
          name, source_path, path, size, curr_size, state, state_name,
          human_size, percent, tooltip, threshold)
          VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'''
          req = self.cursor.execute(sql, task)
          self.check_commit(force=force)
          return req.lastrowif add_task_db(self, task, force=True):
          '''向数据库中写入一个新的任务记录, 并返回它的fid'''
          sql = '''INSERT INTO upload (
          name, source_path, path, size, curr_size, state, state_name,
          human_size, percent, tooltip, threshold)
          VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'''
          req = self.cursor.execute(sql, task)
          self.check_commit(force=force)
          return req.lastrowid
docs: 向数据库中写入一个新的任务记录, 并返回它的fid