code: def check_commit(self, force=False):
          '''当修改数据库超过100次后, 就自动commit数据.'''
          self.commit_count = self.commit_count + 1
          if force or self.commit_count >= 100:
              self.commit_count = 0
              self.conn.commit(f check_commit(self, force=False):
          '''当修改数据库超过100次后, 就自动commit数据.'''
          self.commit_count = self.commit_count + 1
          if force or self.commit_count >= 100:
              self.commit_count = 0
              self.conn.commit()
docs: 当修改数据库超过100次后, 就自动commit数据.