Skip to content

Commit 17b6e2a

Browse files
committed
Add DBCursor to types.py.
1 parent 0c1165e commit 17b6e2a

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

litecli/packages/special/types.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from __future__ import annotations
2+
3+
from typing import Any, List, Optional, Protocol, Sequence, Tuple
4+
5+
6+
class DBCursor(Protocol):
7+
"""Minimal DB-API cursor protocol used by special modules."""
8+
9+
description: Optional[Sequence[Sequence[Any]]]
10+
11+
def execute(self, sql: str, params: Any = ...) -> Any: ...
12+
13+
def fetchall(self) -> List[Tuple[Any, ...]]: ...
14+
15+
def fetchone(self) -> Optional[Tuple[Any, ...]]: ...

0 commit comments

Comments
 (0)