INNER CODE UNIT · Python
stmt
c0sogi/LLMChat · app/database/schemas/__init__.py:83
stmt = update(cls).filter(*criteria).values(**updated)
return await db.run_in_session(db._execute)(
session,
autocommit=autocommit,
refresh=refresh,
stmt=stmt,
)
@classmethod
async def delete_filtered(
cls: Type[TableGeneric],
*criteria: ExpressionElementRole[bool],
autocommit: bool = False,
refresh: bool = False,
session: AsyncSession | None = None,
) -> TableGeneric:
stmt = delete(cls).filter(*criteria)
return await db.run_in_session(db._execute)(