1 from typing import Union, Tuple, Any, Dict, Optional, Text, Iterator, List
\r
2 from .connections import Connection
\r
4 Gen = Union[Tuple[Any, ...], Dict[str, Any]]
\r
7 connection = ... # type: Connection
\r
8 description = ... # type: Tuple[Text, ...]
\r
9 rownumber = ... # type: int
\r
10 rowcount = ... # type: int
\r
11 arraysize = ... # type: int
\r
12 messages = ... # type: Any
\r
13 errorhandler = ... # type: Any
\r
14 lastrowid = ... # type: int
\r
15 def __init__(self, connection: Connection) -> None: ...
\r
16 def __del__(self) -> None: ...
\r
17 def close(self) -> None: ...
\r
18 def setinputsizes(self, *args): ...
\r
19 def setoutputsizes(self, *args): ...
\r
20 def nextset(self): ...
\r
21 def execute(self, query: str, args=None) -> int: ...
\r
22 def executemany(self, query: str, args) -> int: ...
\r
23 def callproc(self, procname, args=...): ...
\r
24 def fetchone(self) -> Optional[Gen]: ...
\r
25 def fetchmany(self, size: Optional[int] = ...) -> Union[Optional[Gen], List[Gen]]: ...
\r
26 def fetchall(self) -> Optional[Tuple[Gen, ...]]: ...
\r
27 def scroll(self, value: int, mode: str = ...): ...
\r
28 def __iter__(self): ...
\r
30 class DictCursor(Cursor):
\r
31 def fetchone(self) -> Optional[Dict[str, Any]]: ...
\r
32 def fetchmany(self, size: Optional[int] = ...) -> Optional[Tuple[Dict[str, Any], ...]]: ...
\r
33 def fetchall(self) -> Optional[Tuple[Dict[str, Any], ...]]: ...
\r
35 class DictCursorMixin:
\r
36 dict_type = ... # type: Any
\r
38 class SSCursor(Cursor):
\r
39 # fetchall return type is incompatible with the supertype.
\r
40 def fetchall(self) -> List[Gen]: ... # type: ignore
\r
41 def fetchall_unbuffered(self) -> Iterator[Tuple[Gen, ...]]: ...
\r
42 def __iter__(self) -> Iterator[Tuple[Gen, ...]]: ...
\r
43 def fetchmany(self, size: Optional[int] = ...) -> List[Gen]: ...
\r
44 def scroll(self, value: int, mode: str = ...) -> None: ...
\r
46 class SSDictCursor(DictCursorMixin, SSCursor): ...
\r