Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,443 changes: 1,443 additions & 0 deletions _duckdb-stubs/__init__.pyi

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions _duckdb-stubs/_func.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import typing as pytyping

__all__: list[str] = ["ARROW", "DEFAULT", "NATIVE", "SPECIAL", "FunctionNullHandling", "PythonUDFType"]

class FunctionNullHandling:
DEFAULT: pytyping.ClassVar[FunctionNullHandling] # value = <FunctionNullHandling.DEFAULT: 0>
SPECIAL: pytyping.ClassVar[FunctionNullHandling] # value = <FunctionNullHandling.SPECIAL: 1>
__members__: pytyping.ClassVar[
dict[str, FunctionNullHandling]
] # value = {'DEFAULT': <FunctionNullHandling.DEFAULT: 0>, 'SPECIAL': <FunctionNullHandling.SPECIAL: 1>}
def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __init__(self, value: pytyping.SupportsInt) -> None: ...
def __int__(self) -> int: ...
def __ne__(self, other: object) -> bool: ...
def __setstate__(self, state: pytyping.SupportsInt) -> None: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...

class PythonUDFType:
ARROW: pytyping.ClassVar[PythonUDFType] # value = <PythonUDFType.ARROW: 1>
NATIVE: pytyping.ClassVar[PythonUDFType] # value = <PythonUDFType.NATIVE: 0>
__members__: pytyping.ClassVar[
dict[str, PythonUDFType]
] # value = {'NATIVE': <PythonUDFType.NATIVE: 0>, 'ARROW': <PythonUDFType.ARROW: 1>}
def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __init__(self, value: pytyping.SupportsInt) -> None: ...
def __int__(self) -> int: ...
def __ne__(self, other: object) -> bool: ...
def __setstate__(self, state: pytyping.SupportsInt) -> None: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...

ARROW: PythonUDFType # value = <PythonUDFType.ARROW: 1>
DEFAULT: FunctionNullHandling # value = <FunctionNullHandling.DEFAULT: 0>
NATIVE: PythonUDFType # value = <PythonUDFType.NATIVE: 0>
SPECIAL: FunctionNullHandling # value = <FunctionNullHandling.SPECIAL: 1>
75 changes: 75 additions & 0 deletions _duckdb-stubs/_sqltypes.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import duckdb
import typing as pytyping

__all__: list[str] = [
"BIGINT",
"BIT",
"BLOB",
"BOOLEAN",
"DATE",
"DOUBLE",
"FLOAT",
"HUGEINT",
"INTEGER",
"INTERVAL",
"SMALLINT",
"SQLNULL",
"TIME",
"TIMESTAMP",
"TIMESTAMP_MS",
"TIMESTAMP_NS",
"TIMESTAMP_S",
"TIMESTAMP_TZ",
"TIME_TZ",
"TINYINT",
"UBIGINT",
"UHUGEINT",
"UINTEGER",
"USMALLINT",
"UTINYINT",
"UUID",
"VARCHAR",
"DuckDBPyType",
]

class DuckDBPyType:
def __eq__(self, other: object) -> bool: ...
def __getattr__(self, name: str) -> DuckDBPyType: ...
def __getitem__(self, name: str) -> DuckDBPyType: ...
def __hash__(self) -> int: ...
@pytyping.overload
def __init__(self, type_str: str, connection: duckdb.DuckDBPyConnection) -> None: ...
@pytyping.overload
def __init__(self, obj: object) -> None: ...
@property
def children(self) -> list[tuple[str, object]]: ...
@property
def id(self) -> str: ...

BIGINT: DuckDBPyType # value = BIGINT
BIT: DuckDBPyType # value = BIT
BLOB: DuckDBPyType # value = BLOB
BOOLEAN: DuckDBPyType # value = BOOLEAN
DATE: DuckDBPyType # value = DATE
DOUBLE: DuckDBPyType # value = DOUBLE
FLOAT: DuckDBPyType # value = FLOAT
HUGEINT: DuckDBPyType # value = HUGEINT
INTEGER: DuckDBPyType # value = INTEGER
INTERVAL: DuckDBPyType # value = INTERVAL
SMALLINT: DuckDBPyType # value = SMALLINT
SQLNULL: DuckDBPyType # value = "NULL"
TIME: DuckDBPyType # value = TIME
TIMESTAMP: DuckDBPyType # value = TIMESTAMP
TIMESTAMP_MS: DuckDBPyType # value = TIMESTAMP_MS
TIMESTAMP_NS: DuckDBPyType # value = TIMESTAMP_NS
TIMESTAMP_S: DuckDBPyType # value = TIMESTAMP_S
TIMESTAMP_TZ: DuckDBPyType # value = TIMESTAMP WITH TIME ZONE
TIME_TZ: DuckDBPyType # value = TIME WITH TIME ZONE
TINYINT: DuckDBPyType # value = TINYINT
UBIGINT: DuckDBPyType # value = UBIGINT
UHUGEINT: DuckDBPyType # value = UHUGEINT
UINTEGER: DuckDBPyType # value = UINTEGER
USMALLINT: DuckDBPyType # value = USMALLINT
UTINYINT: DuckDBPyType # value = UTINYINT
UUID: DuckDBPyType # value = UUID
VARCHAR: DuckDBPyType # value = VARCHAR
Loading
Loading