# -*- python -*-
from typing import Any, Dict, Iterator, List, Optional, Sequence, Tuple, Union

Binding = Union[Sequence[Any], Dict[str, Any]]
Row = Tuple[Any, ...]


class Cursor:
    def close(self, force: bool = False) -> None: ...
    def execute(
            self, statements: str,
            bindings: Optional[Binding] = None,
    ) -> 'Cursor': ...
    def executemany(
            self, statements: str,
            bindings: Sequence[Binding],
    ) -> 'Cursor': ...
    def fetchall(self) -> List[Row]: ...
    def fetchone(self) -> Optional[Row]: ...


class Connection:
    def __init__(self, filename: str) -> None: ...
    def close(self, force: bool = False) -> None: ...
    def cursor(self) -> Cursor: ...
    def changes(self) -> int: ...
