Exemple #1
0
async def update_movie(id: int, payload: MovieIn):
    query = (movies.update().where(movies.c.id == id).values(**payload.dict()))
    return await database.execute(query=query)
async def update_movie(id: int, payload: MovieIn):
    query = (movies.update().where(movies.c.id == id).values(**payload.dict()))
    await database.execute(query=query)
    modified_movie = movies.select(movies.c.id == id)
    return await database.fetch_one(query=modified_movie)