|
1 | | -from typing import Any, Optional, Dict |
| 1 | +from typing import Any, Optional, Dict, Union |
2 | 2 | from sqlalchemy import log |
| 3 | +from sqlalchemy.sql.expression import ClauseElement |
| 4 | +from sqlalchemy.sql.functions import FunctionElement |
| 5 | +from sqlalchemy.schema import DDLElement, DefaultGenerator |
| 6 | +from sqlalchemy.engine.interfaces import Compiled |
3 | 7 | from .interfaces import Connectable as Connectable, ExceptionContext as ExceptionContext |
| 8 | +from .result import ResultProxy |
4 | 9 |
|
5 | 10 | class Transaction(object): |
6 | 11 | connection: Any = ... |
@@ -97,7 +102,10 @@ class Engine(Connectable, log.Identified): |
97 | 102 | def begin(self, close_with_result: bool = ...): ... |
98 | 103 | def transaction(self, callable_, *args, **kwargs): ... |
99 | 104 | def run_callable(self, callable_, *args, **kwargs): ... |
100 | | - def execute(self, statement, *multiparams, **params): ... |
| 105 | + def execute(self, |
| 106 | + object: Union[str, ClauseElement, FunctionElement, DDLElement, DefaultGenerator, Compiled], |
| 107 | + *multiparams: Any, |
| 108 | + **params: Any) -> ResultProxy: ... |
101 | 109 | def scalar(self, statement, *multiparams, **params): ... |
102 | 110 | def connect(self, **kwargs) -> Connection: ... |
103 | 111 | def contextual_connect(self, close_with_result: bool = ..., **kwargs): ... |
|
0 commit comments