Esempio n. 1
0
 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)
Esempio n. 2
0
 def getFilmsByCategory(self, category):
     result = DButils.executemany(FilmSql.SELECT_FILMINFO_BY_CATEGORY,
                                  (category))
     return result
Esempio n. 3
0
 def getFilmsByActorName(self, name):
     result = DButils.executemany(FilmSql.SELECT_FILMINFO_BY_ACTOR, (name))
     return result
Esempio n. 4
0
 def getFilmsByLanguageId(self, languageId):
     result = DButils.executemany(FilmSql.SELECT_FILMINFO_BY_LANGUAGE,
                                  (languageId))
     return result
Esempio n. 5
0
 def getFilms(self):
     result = DButils.executemany(FilmSql.SELECT_FILMS)
     return result
Esempio n. 6
0
 def deleteActorById(self, id):
     try:
         DButils.executemany(ActorSql.delete_actor, id)
         return 'OK'
     except Exception as e:
         raise e
Esempio n. 7
0
 def getActorsByFilmId(self, id):
     result = DButils.executemany(ActorSql.select_actor_by_film_id, (id))
     return result
Esempio n. 8
0
 def getActor(self):
     result = DButils.executemany(ActorSql.select_actor, None)
     return result