massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / third_party / 2and3 / pymysql / cursors.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/third_party/2and3/pymysql/cursors.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/third_party/2and3/pymysql/cursors.pyi
new file mode 100644 (file)
index 0000000..99bc0a7
--- /dev/null
@@ -0,0 +1,46 @@
+from typing import Union, Tuple, Any, Dict, Optional, Text, Iterator, List\r
+from .connections import Connection\r
+\r
+Gen = Union[Tuple[Any, ...], Dict[str, Any]]\r
+\r
+class Cursor:\r
+    connection = ...  # type: Connection\r
+    description = ...  # type: Tuple[Text, ...]\r
+    rownumber = ...  # type: int\r
+    rowcount = ...  # type: int\r
+    arraysize = ...  # type: int\r
+    messages = ...  # type: Any\r
+    errorhandler = ...  # type: Any\r
+    lastrowid = ...  # type: int\r
+    def __init__(self, connection: Connection) -> None: ...\r
+    def __del__(self) -> None: ...\r
+    def close(self) -> None: ...\r
+    def setinputsizes(self, *args): ...\r
+    def setoutputsizes(self, *args): ...\r
+    def nextset(self): ...\r
+    def execute(self, query: str, args=None) -> int: ...\r
+    def executemany(self, query: str, args) -> int: ...\r
+    def callproc(self, procname, args=...): ...\r
+    def fetchone(self) -> Optional[Gen]: ...\r
+    def fetchmany(self, size: Optional[int] = ...) -> Union[Optional[Gen], List[Gen]]: ...\r
+    def fetchall(self) -> Optional[Tuple[Gen, ...]]: ...\r
+    def scroll(self, value: int, mode: str = ...): ...\r
+    def __iter__(self): ...\r
+\r
+class DictCursor(Cursor):\r
+    def fetchone(self) -> Optional[Dict[str, Any]]: ...\r
+    def fetchmany(self, size: Optional[int] = ...) -> Optional[Tuple[Dict[str, Any], ...]]: ...\r
+    def fetchall(self) -> Optional[Tuple[Dict[str, Any], ...]]: ...\r
+\r
+class DictCursorMixin:\r
+    dict_type = ...  # type: Any\r
+\r
+class SSCursor(Cursor):\r
+    # fetchall return type is incompatible with the supertype.\r
+    def fetchall(self) -> List[Gen]: ...  # type: ignore\r
+    def fetchall_unbuffered(self) -> Iterator[Tuple[Gen, ...]]: ...\r
+    def __iter__(self) -> Iterator[Tuple[Gen, ...]]: ...\r
+    def fetchmany(self, size: Optional[int] = ...) -> List[Gen]: ...\r
+    def scroll(self, value: int, mode: str = ...) -> None: ...\r
+\r
+class SSDictCursor(DictCursorMixin, SSCursor): ...\r