PyDrocsid.database
¶
db_context
async
¶
db_context() -> AsyncIterator[None]
Async context manager for database sessions.
Source code in PyDrocsid/database/__init__.py
12 13 14 15 16 17 18 19 20 21 |
|
db_wrapper ¶
db_wrapper(f: Callable[P, Awaitable[T]]) -> Callable[P, Awaitable[T]]
Decorator which wraps an async function in a database context.
Source code in PyDrocsid/database/__init__.py
24 25 26 27 28 29 30 31 32 |
|
delete ¶
delete(table: Any) -> Delete
Shortcut for :meth:sqlalchemy.sql.expression.delete
Source code in PyDrocsid/database/database.py
79 80 81 82 |
|
exists ¶
exists(statement: Executable, *entities: Column[Any], **kwargs: Any) -> Exists
Shortcut for :meth:sqlalchemy.future.select
Source code in PyDrocsid/database/database.py
73 74 75 76 |
|
filter_by ¶
filter_by(cls: Any, *args: Column[Any], **kwargs: Any) -> Select
Shortcut for :meth:sqlalchemy.future.Select.filter_by
Source code in PyDrocsid/database/database.py
67 68 69 70 |
|
select ¶
select(entity: Any, *args: Column[Any]) -> Select
Shortcut for :meth:sqlalchemy.future.select
Source code in PyDrocsid/database/database.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|