def updateActor(self, id, actor): actorTemp = self.getActorById(id) actorTemp = objectview({**actorTemp, **actor}) DButils.executemany(ActorSql.update_actor, (actorTemp.first_name, actorTemp.last_name, id), True) return self.getActorById(id)
def getFilmsByCategory(self, category): result = DButils.executemany(FilmSql.SELECT_FILMINFO_BY_CATEGORY, (category)) return result
def getFilmsByActorName(self, name): result = DButils.executemany(FilmSql.SELECT_FILMINFO_BY_ACTOR, (name)) return result
def getFilmsByLanguageId(self, languageId): result = DButils.executemany(FilmSql.SELECT_FILMINFO_BY_LANGUAGE, (languageId)) return result
def getFilms(self): result = DButils.executemany(FilmSql.SELECT_FILMS) return result
def deleteActorById(self, id): try: DButils.executemany(ActorSql.delete_actor, id) return 'OK' except Exception as e: raise e
def getActorsByFilmId(self, id): result = DButils.executemany(ActorSql.select_actor_by_film_id, (id)) return result
def getActor(self): result = DButils.executemany(ActorSql.select_actor, None) return result