File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
packages/postgres-database/src/simcore_postgres_database Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 88from collections .abc import Awaitable
99from typing import Any , Protocol , TypeAlias , TypeVar
1010
11- from sqlalchemy .sql .dml import Delete , Insert , Update
12- from sqlalchemy .sql .elements import TextClause
13- from sqlalchemy .sql .selectable import Select
11+ from sqlalchemy .sql import Executable
1412
1513# Type for query results
1614Result = TypeVar ("Result" )
@@ -35,9 +33,17 @@ class DBConnection(Protocol):
3533 """Protocol to account for both aiopg and SQLAlchemy async connections"""
3634
3735 async def scalar (
38- self , statement : Select | Insert | Update | Delete | TextClause , ** kwargs
36+ self ,
37+ statement : Executable ,
38+ parameters : dict [str , Any ] | None = None ,
39+ * ,
40+ execution_options : dict [str , Any ] | None = None ,
3941 ) -> Any : ...
4042
4143 async def execute (
42- self , statement : Select | Insert | Update | Delete | TextClause , ** kwargs
44+ self ,
45+ statement : Executable ,
46+ parameters : dict [str , Any ] | None = None ,
47+ * ,
48+ execution_options : dict [str , Any ] | None = None ,
4349 ) -> ResultProxy : ...
You can’t perform that action at this time.
0 commit comments