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