|
15 | 15 | from sqlalchemy.orm import Query as _Query |
16 | 16 | from sqlalchemy.orm import Session as _Session |
17 | 17 | from sqlalchemy.orm._typing import OrmExecuteOptionsParameter |
| 18 | +from sqlalchemy.sql import Delete |
18 | 19 | from sqlalchemy.sql._typing import _ColumnsClauseArgument |
19 | 20 | from sqlalchemy.sql.base import Executable as _Executable |
20 | 21 | from sqlmodel.sql.base import Executable |
@@ -49,20 +50,33 @@ def exec( |
49 | 50 | _add_event: Optional[Any] = None, |
50 | 51 | ) -> ScalarResult[_TSelectParam]: ... |
51 | 52 |
|
| 53 | + @overload |
| 54 | + def exec( |
| 55 | + self, |
| 56 | + statement: Delete, |
| 57 | + *, |
| 58 | + params: Optional[Union[Mapping[str, Any], Sequence[Mapping[str, Any]]]] = None, |
| 59 | + execution_options: Mapping[str, Any] = util.EMPTY_DICT, |
| 60 | + bind_arguments: Optional[Dict[str, Any]] = None, |
| 61 | + _parent_execute_state: Optional[Any] = None, |
| 62 | + _add_event: Optional[Any] = None, |
| 63 | + ) -> None: ... |
| 64 | + |
52 | 65 | def exec( |
53 | 66 | self, |
54 | 67 | statement: Union[ |
55 | 68 | Select[_TSelectParam], |
56 | 69 | SelectOfScalar[_TSelectParam], |
57 | 70 | Executable[_TSelectParam], |
| 71 | + Delete, |
58 | 72 | ], |
59 | 73 | *, |
60 | 74 | params: Optional[Union[Mapping[str, Any], Sequence[Mapping[str, Any]]]] = None, |
61 | 75 | execution_options: Mapping[str, Any] = util.EMPTY_DICT, |
62 | 76 | bind_arguments: Optional[Dict[str, Any]] = None, |
63 | 77 | _parent_execute_state: Optional[Any] = None, |
64 | 78 | _add_event: Optional[Any] = None, |
65 | | - ) -> Union[TupleResult[_TSelectParam], ScalarResult[_TSelectParam]]: |
| 79 | + ) -> Union[TupleResult[_TSelectParam], ScalarResult[_TSelectParam], None]: |
66 | 80 | results = super().execute( |
67 | 81 | statement, |
68 | 82 | params=params, |
|
0 commit comments