diff --git a/stubs/hdbcli/METADATA.toml b/stubs/hdbcli/METADATA.toml index 168d2786a79a..c7d8c8e65386 100644 --- a/stubs/hdbcli/METADATA.toml +++ b/stubs/hdbcli/METADATA.toml @@ -1,2 +1,2 @@ -version = "2.25.*" +version = "2.27.*" # upstream_repository = closed-source diff --git a/stubs/hdbcli/hdbcli/dbapi.pyi b/stubs/hdbcli/hdbcli/dbapi.pyi index 8cccb842afe8..6daf7f1c54ca 100644 --- a/stubs/hdbcli/hdbcli/dbapi.pyi +++ b/stubs/hdbcli/hdbcli/dbapi.pyi @@ -141,3 +141,50 @@ DATETIME: type[date | time | datetime] STRING = str BINARY = memoryview ROWID = int + +class AsyncConnection(Connection): + @classmethod + async def create( + cls, + address: str = "", + port: int = 0, + user: str = "", + password: str = "", + autocommit: bool = True, + packetsize: int | None = None, + userkey: str | None = ..., + *, + sessionvariables: dict[str, str] | None = ..., + forcebulkfetch: bool | None = ..., + ) -> Self: ... + async def cancel(self) -> bool: ... + async def close(self) -> None: ... + async def commit(self) -> None: ... + async def cursor(self) -> AsyncCursor: ... + async def rollback(self) -> None: ... + +class AsyncCursor(Cursor): + async def callproc(self, procname: str, parameters: tuple[Any, ...] = ..., overview: bool = ...) -> tuple[Any, ...]: ... + async def close(self) -> None: ... + async def execute(self, operation: str, parameters: tuple[Any, ...] | None = ...) -> bool: ... + async def executemany(self, operation: str, parameters: _Parameters = ..., batcherrors: bool = False) -> Any: ... + async def executemanyprepared(self, parameters: _Parameters = ...) -> Any: ... + async def executeprepared(self, parameters: _Parameters = ...) -> Any: ... + async def fetchone(self, uselob: bool = ...) -> ResultRow | None: ... + async def fetchall(self) -> list[ResultRow]: ... + async def fetchmany(self, size: int | None = ...) -> list[ResultRow]: ... + async def nextset(self) -> None: ... + async def prepare(self, operation: str, newcursor: bool = ...) -> Any: ... + async def scroll(self, value: int, mode: Literal["absolute", "relative"] = ...) -> None: ... + async def __aenter__(self) -> Self: ... + async def __aexit__(self, typ: type[BaseException] | None, val: BaseException | None, tb: TracebackType | None) -> None: ... + +class AsyncLob(LOB): + async def close(self) -> None: ... + async def find(self, object: str, length: int, position: int = ...) -> int: ... + async def read(self, size: int = ..., position: int = ...) -> str | bytes: ... + async def write(self, object: str | bytes) -> int: ... + +async_connect = AsyncConnection + +def set_async_mode(enabled: bool = True) -> None: ...