Beispiel #1
0
async def delete_all_tokens_from_db(engine):
    async with engine.acquire() as conn:
        await conn.execute(tokens.delete())
Beispiel #2
0
async def delete_token_from_db(engine, *, token_id):
    expr = tokens.c.token_id == token_id
    async with engine.acquire() as conn:
        stmt = tokens.delete().where(expr)
        await conn.execute(stmt)