def save(self): sql = self.__insert__ args = list(map(self.getValue, self.__fields__)) args.append(self.getValue(self.__primaryKey__)) rs = execute(sql, args) if rs != 1: logging.warning('Entry save failed')
def update(self): sql = self.__update__ args = list(map(self.getValue, self.__fields__)) args.append(self.getValue(self.__primaryKey__)) rs = yield from execute(sql,args) if rs != 1: logging.warning('Entry update failed')
def remove(self): sql = self.__delete__ args = [self.getValue(self.__primaryKey__)] rs = execute(sql, args) if rs!= 1: logging.warning('Entry remove failed')