Пример #1
0
async def get_all():
    query = notes.select()
    return await database.fetch_all(query=query)
Пример #2
0
async def get(id: int):
    query = notes.select().where(id == notes.c.id)
    return await database.fetch_one(query=query)
async def read_notes():
    query = notes.select()
    retrieved_notes = await database.fetch_all(query)
    return {"notes": retrieved_notes}