How to delete rows by a condition using sqlalmchemy and fastapi? – Postgresql
I'm trying to delete some rows that a 'null' in a Postgresql db by this: async def delete_empty_batches(): query = Batches.delete().where(Batches.c.acquired_by_warehouse_date is None) database.execute(query).fetchall() s = Batches.select() return await database.execute(s).fetchall() But nothing happens. I have tried to make a query…