duckdb 1.5.0.dev37__cp312-cp312-win_amd64.whl → 1.5.0.dev94__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of duckdb might be problematic. Click here for more details.
- _duckdb-stubs/__init__.pyi +1443 -0
- _duckdb-stubs/_func.pyi +46 -0
- _duckdb-stubs/_sqltypes.pyi +75 -0
- _duckdb.cp312-win_amd64.pyd +0 -0
- adbc_driver_duckdb/__init__.py +49 -0
- adbc_driver_duckdb/dbapi.py +115 -0
- duckdb/__init__.py +341 -435
- duckdb/_dbapi_type_object.py +231 -0
- duckdb/_version.py +22 -0
- duckdb/bytes_io_wrapper.py +12 -9
- duckdb/experimental/__init__.py +2 -1
- duckdb/experimental/spark/__init__.py +3 -4
- duckdb/experimental/spark/_globals.py +8 -8
- duckdb/experimental/spark/_typing.py +7 -9
- duckdb/experimental/spark/conf.py +16 -15
- duckdb/experimental/spark/context.py +60 -44
- duckdb/experimental/spark/errors/__init__.py +33 -35
- duckdb/experimental/spark/errors/error_classes.py +1 -1
- duckdb/experimental/spark/errors/exceptions/__init__.py +1 -1
- duckdb/experimental/spark/errors/exceptions/base.py +39 -88
- duckdb/experimental/spark/errors/utils.py +11 -16
- duckdb/experimental/spark/exception.py +9 -6
- duckdb/experimental/spark/sql/__init__.py +5 -5
- duckdb/experimental/spark/sql/_typing.py +8 -15
- duckdb/experimental/spark/sql/catalog.py +21 -20
- duckdb/experimental/spark/sql/column.py +48 -55
- duckdb/experimental/spark/sql/conf.py +9 -8
- duckdb/experimental/spark/sql/dataframe.py +185 -233
- duckdb/experimental/spark/sql/functions.py +1222 -1248
- duckdb/experimental/spark/sql/group.py +56 -52
- duckdb/experimental/spark/sql/readwriter.py +80 -94
- duckdb/experimental/spark/sql/session.py +64 -59
- duckdb/experimental/spark/sql/streaming.py +9 -10
- duckdb/experimental/spark/sql/type_utils.py +67 -65
- duckdb/experimental/spark/sql/types.py +309 -345
- duckdb/experimental/spark/sql/udf.py +6 -6
- duckdb/filesystem.py +26 -16
- duckdb/func/__init__.py +3 -0
- duckdb/functional/__init__.py +12 -16
- duckdb/polars_io.py +130 -83
- duckdb/query_graph/__main__.py +91 -96
- duckdb/sqltypes/__init__.py +63 -0
- duckdb/typing/__init__.py +18 -8
- duckdb/udf.py +10 -5
- duckdb/value/__init__.py +1 -0
- duckdb/value/constant/__init__.py +62 -60
- {duckdb-1.5.0.dev37.dist-info → duckdb-1.5.0.dev94.dist-info}/METADATA +12 -4
- duckdb-1.5.0.dev94.dist-info/RECORD +52 -0
- duckdb/__init__.pyi +0 -713
- duckdb/functional/__init__.pyi +0 -31
- duckdb/typing/__init__.pyi +0 -36
- duckdb/value/constant/__init__.pyi +0 -115
- duckdb-1.5.0.dev37.dist-info/RECORD +0 -47
- /duckdb/{value/__init__.pyi → py.typed} +0 -0
- {duckdb-1.5.0.dev37.dist-info → duckdb-1.5.0.dev94.dist-info}/WHEEL +0 -0
- {duckdb-1.5.0.dev37.dist-info → duckdb-1.5.0.dev94.dist-info}/licenses/LICENSE +0 -0
duckdb/__init__.py
CHANGED
|
@@ -1,475 +1,381 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
import duckdb.typing as typing
|
|
4
|
-
from _duckdb import __version__ as duckdb_version
|
|
5
|
-
from importlib.metadata import version
|
|
1
|
+
# ruff: noqa: F401
|
|
2
|
+
"""The DuckDB Python Package.
|
|
6
3
|
|
|
7
|
-
|
|
8
|
-
__version__ = version("duckdb")
|
|
4
|
+
This module re-exports the DuckDB C++ extension (`_duckdb`) and provides DuckDB's public API.
|
|
9
5
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
Note:
|
|
7
|
+
- Some symbols exposed here are implementation details of DuckDB's C++ engine.
|
|
8
|
+
- They are kept for backwards compatibility but are not considered stable API.
|
|
9
|
+
- Future versions may move them into submodules with deprecation warnings.
|
|
10
|
+
"""
|
|
13
11
|
|
|
14
|
-
_exported_symbols = ['__version__', 'version']
|
|
15
|
-
|
|
16
|
-
_exported_symbols.extend([
|
|
17
|
-
"typing",
|
|
18
|
-
"functional"
|
|
19
|
-
])
|
|
20
|
-
|
|
21
|
-
class DBAPITypeObject:
|
|
22
|
-
def __init__(self, types: list[typing.DuckDBPyType]) -> None:
|
|
23
|
-
self.types = types
|
|
24
|
-
|
|
25
|
-
def __eq__(self, other):
|
|
26
|
-
if isinstance(other, typing.DuckDBPyType):
|
|
27
|
-
return other in self.types
|
|
28
|
-
return False
|
|
29
|
-
|
|
30
|
-
def __repr__(self):
|
|
31
|
-
return f"<DBAPITypeObject [{','.join(str(x) for x in self.types)}]>"
|
|
32
|
-
|
|
33
|
-
# Define the standard DBAPI sentinels
|
|
34
|
-
STRING = DBAPITypeObject([typing.VARCHAR])
|
|
35
|
-
NUMBER = DBAPITypeObject([
|
|
36
|
-
typing.TINYINT,
|
|
37
|
-
typing.UTINYINT,
|
|
38
|
-
typing.SMALLINT,
|
|
39
|
-
typing.USMALLINT,
|
|
40
|
-
typing.INTEGER,
|
|
41
|
-
typing.UINTEGER,
|
|
42
|
-
typing.BIGINT,
|
|
43
|
-
typing.UBIGINT,
|
|
44
|
-
typing.HUGEINT,
|
|
45
|
-
typing.UHUGEINT,
|
|
46
|
-
typing.DuckDBPyType("BIGNUM"),
|
|
47
|
-
typing.DuckDBPyType("DECIMAL"),
|
|
48
|
-
typing.FLOAT,
|
|
49
|
-
typing.DOUBLE
|
|
50
|
-
])
|
|
51
|
-
DATETIME = DBAPITypeObject([
|
|
52
|
-
typing.DATE,
|
|
53
|
-
typing.TIME,
|
|
54
|
-
typing.TIME_TZ,
|
|
55
|
-
typing.TIMESTAMP,
|
|
56
|
-
typing.TIMESTAMP_TZ,
|
|
57
|
-
typing.TIMESTAMP_NS,
|
|
58
|
-
typing.TIMESTAMP_MS,
|
|
59
|
-
typing.TIMESTAMP_S
|
|
60
|
-
])
|
|
61
|
-
BINARY = DBAPITypeObject([typing.BLOB])
|
|
62
|
-
ROWID = None
|
|
63
|
-
|
|
64
|
-
# Classes
|
|
65
12
|
from _duckdb import (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
StatementType,
|
|
71
|
-
ExpectedResultType,
|
|
72
|
-
CSVLineTerminator,
|
|
73
|
-
PythonExceptionHandling,
|
|
74
|
-
RenderMode,
|
|
75
|
-
Expression,
|
|
76
|
-
ConstantExpression,
|
|
13
|
+
BinderException,
|
|
14
|
+
CaseExpression,
|
|
15
|
+
CatalogException,
|
|
16
|
+
CoalesceOperator,
|
|
77
17
|
ColumnExpression,
|
|
18
|
+
ConnectionException,
|
|
19
|
+
ConstantExpression,
|
|
20
|
+
ConstraintException,
|
|
21
|
+
ConversionException,
|
|
22
|
+
CSVLineTerminator,
|
|
23
|
+
DatabaseError,
|
|
24
|
+
DataError,
|
|
78
25
|
DefaultExpression,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
FunctionExpression,
|
|
83
|
-
CaseExpression,
|
|
84
|
-
SQLExpression
|
|
85
|
-
)
|
|
86
|
-
_exported_symbols.extend([
|
|
87
|
-
"DuckDBPyRelation",
|
|
88
|
-
"DuckDBPyConnection",
|
|
89
|
-
"ExplainType",
|
|
90
|
-
"PythonExceptionHandling",
|
|
91
|
-
"Expression",
|
|
92
|
-
"ConstantExpression",
|
|
93
|
-
"ColumnExpression",
|
|
94
|
-
"DefaultExpression",
|
|
95
|
-
"CoalesceOperator",
|
|
96
|
-
"LambdaExpression",
|
|
97
|
-
"StarExpression",
|
|
98
|
-
"FunctionExpression",
|
|
99
|
-
"CaseExpression",
|
|
100
|
-
"SQLExpression"
|
|
101
|
-
])
|
|
102
|
-
|
|
103
|
-
# These are overloaded twice, we define them inside of C++ so pybind can deal with it
|
|
104
|
-
_exported_symbols.extend([
|
|
105
|
-
'df',
|
|
106
|
-
'arrow'
|
|
107
|
-
])
|
|
108
|
-
from _duckdb import (
|
|
109
|
-
df,
|
|
110
|
-
arrow
|
|
111
|
-
)
|
|
112
|
-
|
|
113
|
-
# NOTE: this section is generated by tools/pythonpkg/scripts/generate_connection_wrapper_methods.py.
|
|
114
|
-
# Do not edit this section manually, your changes will be overwritten!
|
|
115
|
-
|
|
116
|
-
# START OF CONNECTION WRAPPER
|
|
117
|
-
|
|
118
|
-
from _duckdb import (
|
|
119
|
-
cursor,
|
|
120
|
-
register_filesystem,
|
|
121
|
-
unregister_filesystem,
|
|
122
|
-
list_filesystems,
|
|
123
|
-
filesystem_is_registered,
|
|
124
|
-
create_function,
|
|
125
|
-
remove_function,
|
|
126
|
-
sqltype,
|
|
127
|
-
dtype,
|
|
128
|
-
type,
|
|
129
|
-
array_type,
|
|
130
|
-
list_type,
|
|
131
|
-
union_type,
|
|
132
|
-
string_type,
|
|
133
|
-
enum_type,
|
|
134
|
-
decimal_type,
|
|
135
|
-
struct_type,
|
|
136
|
-
row_type,
|
|
137
|
-
map_type,
|
|
138
|
-
duplicate,
|
|
139
|
-
execute,
|
|
140
|
-
executemany,
|
|
141
|
-
close,
|
|
142
|
-
interrupt,
|
|
143
|
-
query_progress,
|
|
144
|
-
fetchone,
|
|
145
|
-
fetchmany,
|
|
146
|
-
fetchall,
|
|
147
|
-
fetchnumpy,
|
|
148
|
-
fetchdf,
|
|
149
|
-
fetch_df,
|
|
150
|
-
df,
|
|
151
|
-
fetch_df_chunk,
|
|
152
|
-
pl,
|
|
153
|
-
fetch_arrow_table,
|
|
154
|
-
arrow,
|
|
155
|
-
fetch_record_batch,
|
|
156
|
-
torch,
|
|
157
|
-
tf,
|
|
158
|
-
begin,
|
|
159
|
-
commit,
|
|
160
|
-
rollback,
|
|
161
|
-
checkpoint,
|
|
162
|
-
append,
|
|
163
|
-
register,
|
|
164
|
-
unregister,
|
|
165
|
-
table,
|
|
166
|
-
view,
|
|
167
|
-
values,
|
|
168
|
-
table_function,
|
|
169
|
-
read_json,
|
|
170
|
-
extract_statements,
|
|
171
|
-
sql,
|
|
172
|
-
query,
|
|
173
|
-
from_query,
|
|
174
|
-
read_csv,
|
|
175
|
-
from_csv_auto,
|
|
176
|
-
from_df,
|
|
177
|
-
from_arrow,
|
|
178
|
-
from_parquet,
|
|
179
|
-
read_parquet,
|
|
180
|
-
from_parquet,
|
|
181
|
-
read_parquet,
|
|
182
|
-
get_table_names,
|
|
183
|
-
install_extension,
|
|
184
|
-
load_extension,
|
|
185
|
-
project,
|
|
186
|
-
distinct,
|
|
187
|
-
write_csv,
|
|
188
|
-
aggregate,
|
|
189
|
-
alias,
|
|
190
|
-
filter,
|
|
191
|
-
limit,
|
|
192
|
-
order,
|
|
193
|
-
query_df,
|
|
194
|
-
description,
|
|
195
|
-
rowcount,
|
|
196
|
-
)
|
|
197
|
-
|
|
198
|
-
_exported_symbols.extend([
|
|
199
|
-
'cursor',
|
|
200
|
-
'register_filesystem',
|
|
201
|
-
'unregister_filesystem',
|
|
202
|
-
'list_filesystems',
|
|
203
|
-
'filesystem_is_registered',
|
|
204
|
-
'create_function',
|
|
205
|
-
'remove_function',
|
|
206
|
-
'sqltype',
|
|
207
|
-
'dtype',
|
|
208
|
-
'type',
|
|
209
|
-
'array_type',
|
|
210
|
-
'list_type',
|
|
211
|
-
'union_type',
|
|
212
|
-
'string_type',
|
|
213
|
-
'enum_type',
|
|
214
|
-
'decimal_type',
|
|
215
|
-
'struct_type',
|
|
216
|
-
'row_type',
|
|
217
|
-
'map_type',
|
|
218
|
-
'duplicate',
|
|
219
|
-
'execute',
|
|
220
|
-
'executemany',
|
|
221
|
-
'close',
|
|
222
|
-
'interrupt',
|
|
223
|
-
'query_progress',
|
|
224
|
-
'fetchone',
|
|
225
|
-
'fetchmany',
|
|
226
|
-
'fetchall',
|
|
227
|
-
'fetchnumpy',
|
|
228
|
-
'fetchdf',
|
|
229
|
-
'fetch_df',
|
|
230
|
-
'df',
|
|
231
|
-
'fetch_df_chunk',
|
|
232
|
-
'pl',
|
|
233
|
-
'fetch_arrow_table',
|
|
234
|
-
'arrow',
|
|
235
|
-
'fetch_record_batch',
|
|
236
|
-
'torch',
|
|
237
|
-
'tf',
|
|
238
|
-
'begin',
|
|
239
|
-
'commit',
|
|
240
|
-
'rollback',
|
|
241
|
-
'checkpoint',
|
|
242
|
-
'append',
|
|
243
|
-
'register',
|
|
244
|
-
'unregister',
|
|
245
|
-
'table',
|
|
246
|
-
'view',
|
|
247
|
-
'values',
|
|
248
|
-
'table_function',
|
|
249
|
-
'read_json',
|
|
250
|
-
'extract_statements',
|
|
251
|
-
'sql',
|
|
252
|
-
'query',
|
|
253
|
-
'from_query',
|
|
254
|
-
'read_csv',
|
|
255
|
-
'from_csv_auto',
|
|
256
|
-
'from_df',
|
|
257
|
-
'from_arrow',
|
|
258
|
-
'from_parquet',
|
|
259
|
-
'read_parquet',
|
|
260
|
-
'from_parquet',
|
|
261
|
-
'read_parquet',
|
|
262
|
-
'get_table_names',
|
|
263
|
-
'install_extension',
|
|
264
|
-
'load_extension',
|
|
265
|
-
'project',
|
|
266
|
-
'distinct',
|
|
267
|
-
'write_csv',
|
|
268
|
-
'aggregate',
|
|
269
|
-
'alias',
|
|
270
|
-
'filter',
|
|
271
|
-
'limit',
|
|
272
|
-
'order',
|
|
273
|
-
'query_df',
|
|
274
|
-
'description',
|
|
275
|
-
'rowcount',
|
|
276
|
-
])
|
|
277
|
-
|
|
278
|
-
# END OF CONNECTION WRAPPER
|
|
279
|
-
|
|
280
|
-
# Enums
|
|
281
|
-
from _duckdb import (
|
|
282
|
-
ANALYZE,
|
|
283
|
-
DEFAULT,
|
|
284
|
-
RETURN_NULL,
|
|
285
|
-
STANDARD,
|
|
286
|
-
COLUMNS,
|
|
287
|
-
ROWS
|
|
288
|
-
)
|
|
289
|
-
_exported_symbols.extend([
|
|
290
|
-
"ANALYZE",
|
|
291
|
-
"DEFAULT",
|
|
292
|
-
"RETURN_NULL",
|
|
293
|
-
"STANDARD"
|
|
294
|
-
])
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
# read-only properties
|
|
298
|
-
from _duckdb import (
|
|
299
|
-
__standard_vector_size__,
|
|
300
|
-
__interactive__,
|
|
301
|
-
__jupyter__,
|
|
302
|
-
__formatted_python_version__,
|
|
303
|
-
apilevel,
|
|
304
|
-
comment,
|
|
305
|
-
identifier,
|
|
306
|
-
keyword,
|
|
307
|
-
numeric_const,
|
|
308
|
-
operator,
|
|
309
|
-
paramstyle,
|
|
310
|
-
string_const,
|
|
311
|
-
threadsafety,
|
|
312
|
-
token_type,
|
|
313
|
-
tokenize
|
|
314
|
-
)
|
|
315
|
-
_exported_symbols.extend([
|
|
316
|
-
"__standard_vector_size__",
|
|
317
|
-
"__interactive__",
|
|
318
|
-
"__jupyter__",
|
|
319
|
-
"__formatted_python_version__",
|
|
320
|
-
"apilevel",
|
|
321
|
-
"comment",
|
|
322
|
-
"identifier",
|
|
323
|
-
"keyword",
|
|
324
|
-
"numeric_const",
|
|
325
|
-
"operator",
|
|
326
|
-
"paramstyle",
|
|
327
|
-
"string_const",
|
|
328
|
-
"threadsafety",
|
|
329
|
-
"token_type",
|
|
330
|
-
"tokenize"
|
|
331
|
-
])
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
from _duckdb import (
|
|
335
|
-
connect,
|
|
336
|
-
default_connection,
|
|
337
|
-
set_default_connection,
|
|
338
|
-
)
|
|
339
|
-
|
|
340
|
-
_exported_symbols.extend([
|
|
341
|
-
"connect",
|
|
342
|
-
"default_connection",
|
|
343
|
-
"set_default_connection",
|
|
344
|
-
])
|
|
345
|
-
|
|
346
|
-
# Exceptions
|
|
347
|
-
from _duckdb import (
|
|
26
|
+
DependencyException,
|
|
27
|
+
DuckDBPyConnection,
|
|
28
|
+
DuckDBPyRelation,
|
|
348
29
|
Error,
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
TypeMismatchException,
|
|
30
|
+
ExpectedResultType,
|
|
31
|
+
ExplainType,
|
|
32
|
+
Expression,
|
|
353
33
|
FatalException,
|
|
34
|
+
FunctionExpression,
|
|
35
|
+
HTTPException,
|
|
354
36
|
IntegrityError,
|
|
355
|
-
ConstraintException,
|
|
356
37
|
InternalError,
|
|
357
38
|
InternalException,
|
|
358
39
|
InterruptException,
|
|
359
|
-
|
|
40
|
+
InvalidInputException,
|
|
41
|
+
InvalidTypeException,
|
|
42
|
+
IOException,
|
|
43
|
+
LambdaExpression,
|
|
360
44
|
NotImplementedException,
|
|
45
|
+
NotSupportedError,
|
|
361
46
|
OperationalError,
|
|
362
|
-
ConnectionException,
|
|
363
|
-
IOException,
|
|
364
|
-
HTTPException,
|
|
365
47
|
OutOfMemoryException,
|
|
366
|
-
|
|
367
|
-
|
|
48
|
+
OutOfRangeException,
|
|
49
|
+
ParserException,
|
|
368
50
|
PermissionException,
|
|
369
51
|
ProgrammingError,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
InvalidInputException,
|
|
373
|
-
InvalidTypeException,
|
|
374
|
-
ParserException,
|
|
375
|
-
SyntaxException,
|
|
52
|
+
PythonExceptionHandling,
|
|
53
|
+
RenderMode,
|
|
376
54
|
SequenceException,
|
|
377
|
-
|
|
55
|
+
SerializationException,
|
|
56
|
+
SQLExpression,
|
|
57
|
+
StarExpression,
|
|
58
|
+
Statement,
|
|
59
|
+
StatementType,
|
|
60
|
+
SyntaxException,
|
|
61
|
+
TransactionException,
|
|
62
|
+
TypeMismatchException,
|
|
63
|
+
Warning,
|
|
64
|
+
__formatted_python_version__,
|
|
65
|
+
__git_revision__,
|
|
66
|
+
__interactive__,
|
|
67
|
+
__jupyter__,
|
|
68
|
+
__standard_vector_size__,
|
|
69
|
+
_clean_default_connection,
|
|
70
|
+
aggregate,
|
|
71
|
+
alias,
|
|
72
|
+
apilevel,
|
|
73
|
+
append,
|
|
74
|
+
array_type,
|
|
75
|
+
arrow,
|
|
76
|
+
begin,
|
|
77
|
+
checkpoint,
|
|
78
|
+
close,
|
|
79
|
+
commit,
|
|
80
|
+
connect,
|
|
81
|
+
create_function,
|
|
82
|
+
cursor,
|
|
83
|
+
decimal_type,
|
|
84
|
+
default_connection,
|
|
85
|
+
description,
|
|
86
|
+
df,
|
|
87
|
+
distinct,
|
|
88
|
+
dtype,
|
|
89
|
+
duplicate,
|
|
90
|
+
enum_type,
|
|
91
|
+
execute,
|
|
92
|
+
executemany,
|
|
93
|
+
extract_statements,
|
|
94
|
+
fetch_arrow_table,
|
|
95
|
+
fetch_df,
|
|
96
|
+
fetch_df_chunk,
|
|
97
|
+
fetch_record_batch,
|
|
98
|
+
fetchall,
|
|
99
|
+
fetchdf,
|
|
100
|
+
fetchmany,
|
|
101
|
+
fetchnumpy,
|
|
102
|
+
fetchone,
|
|
103
|
+
filesystem_is_registered,
|
|
104
|
+
filter,
|
|
105
|
+
from_arrow,
|
|
106
|
+
from_csv_auto,
|
|
107
|
+
from_df,
|
|
108
|
+
from_parquet,
|
|
109
|
+
from_query,
|
|
110
|
+
get_table_names,
|
|
111
|
+
install_extension,
|
|
112
|
+
interrupt,
|
|
113
|
+
limit,
|
|
114
|
+
list_filesystems,
|
|
115
|
+
list_type,
|
|
116
|
+
load_extension,
|
|
117
|
+
map_type,
|
|
118
|
+
order,
|
|
119
|
+
paramstyle,
|
|
120
|
+
pl,
|
|
121
|
+
project,
|
|
122
|
+
query,
|
|
123
|
+
query_df,
|
|
124
|
+
query_progress,
|
|
125
|
+
read_csv,
|
|
126
|
+
read_json,
|
|
127
|
+
read_parquet,
|
|
128
|
+
register,
|
|
129
|
+
register_filesystem,
|
|
130
|
+
remove_function,
|
|
131
|
+
rollback,
|
|
132
|
+
row_type,
|
|
133
|
+
rowcount,
|
|
134
|
+
set_default_connection,
|
|
135
|
+
sql,
|
|
136
|
+
sqltype,
|
|
137
|
+
string_type,
|
|
138
|
+
struct_type,
|
|
139
|
+
table,
|
|
140
|
+
table_function,
|
|
141
|
+
tf,
|
|
142
|
+
threadsafety,
|
|
143
|
+
token_type,
|
|
144
|
+
tokenize,
|
|
145
|
+
torch,
|
|
146
|
+
type,
|
|
147
|
+
union_type,
|
|
148
|
+
unregister,
|
|
149
|
+
unregister_filesystem,
|
|
150
|
+
values,
|
|
151
|
+
view,
|
|
152
|
+
write_csv,
|
|
378
153
|
)
|
|
379
|
-
_exported_symbols.extend([
|
|
380
|
-
"Error",
|
|
381
|
-
"DataError",
|
|
382
|
-
"ConversionException",
|
|
383
|
-
"OutOfRangeException",
|
|
384
|
-
"TypeMismatchException",
|
|
385
|
-
"FatalException",
|
|
386
|
-
"IntegrityError",
|
|
387
|
-
"ConstraintException",
|
|
388
|
-
"InternalError",
|
|
389
|
-
"InternalException",
|
|
390
|
-
"InterruptException",
|
|
391
|
-
"NotSupportedError",
|
|
392
|
-
"NotImplementedException",
|
|
393
|
-
"OperationalError",
|
|
394
|
-
"ConnectionException",
|
|
395
|
-
"IOException",
|
|
396
|
-
"HTTPException",
|
|
397
|
-
"OutOfMemoryException",
|
|
398
|
-
"SerializationException",
|
|
399
|
-
"TransactionException",
|
|
400
|
-
"PermissionException",
|
|
401
|
-
"ProgrammingError",
|
|
402
|
-
"BinderException",
|
|
403
|
-
"CatalogException",
|
|
404
|
-
"InvalidInputException",
|
|
405
|
-
"InvalidTypeException",
|
|
406
|
-
"ParserException",
|
|
407
|
-
"SyntaxException",
|
|
408
|
-
"SequenceException",
|
|
409
|
-
"Warning"
|
|
410
|
-
])
|
|
411
154
|
|
|
412
|
-
|
|
155
|
+
from duckdb._dbapi_type_object import (
|
|
156
|
+
BINARY,
|
|
157
|
+
DATETIME,
|
|
158
|
+
NUMBER,
|
|
159
|
+
ROWID,
|
|
160
|
+
STRING,
|
|
161
|
+
DBAPITypeObject,
|
|
162
|
+
)
|
|
163
|
+
from duckdb._version import (
|
|
164
|
+
__duckdb_version__,
|
|
165
|
+
__version__,
|
|
166
|
+
version,
|
|
167
|
+
)
|
|
413
168
|
from duckdb.value.constant import (
|
|
414
|
-
Value,
|
|
415
|
-
NullValue,
|
|
416
|
-
BooleanValue,
|
|
417
|
-
UnsignedBinaryValue,
|
|
418
|
-
UnsignedShortValue,
|
|
419
|
-
UnsignedIntegerValue,
|
|
420
|
-
UnsignedLongValue,
|
|
421
169
|
BinaryValue,
|
|
422
|
-
ShortValue,
|
|
423
|
-
IntegerValue,
|
|
424
|
-
LongValue,
|
|
425
|
-
HugeIntegerValue,
|
|
426
|
-
FloatValue,
|
|
427
|
-
DoubleValue,
|
|
428
|
-
DecimalValue,
|
|
429
|
-
StringValue,
|
|
430
|
-
UUIDValue,
|
|
431
170
|
BitValue,
|
|
432
171
|
BlobValue,
|
|
172
|
+
BooleanValue,
|
|
433
173
|
DateValue,
|
|
174
|
+
DecimalValue,
|
|
175
|
+
DoubleValue,
|
|
176
|
+
FloatValue,
|
|
177
|
+
HugeIntegerValue,
|
|
178
|
+
IntegerValue,
|
|
434
179
|
IntervalValue,
|
|
435
|
-
|
|
436
|
-
|
|
180
|
+
ListValue,
|
|
181
|
+
LongValue,
|
|
182
|
+
MapValue,
|
|
183
|
+
NullValue,
|
|
184
|
+
ShortValue,
|
|
185
|
+
StringValue,
|
|
186
|
+
StructValue,
|
|
437
187
|
TimestampMilisecondValue,
|
|
438
188
|
TimestampNanosecondValue,
|
|
189
|
+
TimestampSecondValue,
|
|
439
190
|
TimestampTimeZoneValue,
|
|
440
|
-
|
|
191
|
+
TimestampValue,
|
|
441
192
|
TimeTimeZoneValue,
|
|
193
|
+
TimeValue,
|
|
194
|
+
UnionType,
|
|
195
|
+
UnsignedBinaryValue,
|
|
196
|
+
UnsignedHugeIntegerValue,
|
|
197
|
+
UnsignedIntegerValue,
|
|
198
|
+
UnsignedLongValue,
|
|
199
|
+
UnsignedShortValue,
|
|
200
|
+
UUIDValue,
|
|
201
|
+
Value,
|
|
442
202
|
)
|
|
443
203
|
|
|
444
|
-
|
|
445
|
-
"Value",
|
|
446
|
-
"NullValue",
|
|
447
|
-
"BooleanValue",
|
|
448
|
-
"UnsignedBinaryValue",
|
|
449
|
-
"UnsignedShortValue",
|
|
450
|
-
"UnsignedIntegerValue",
|
|
451
|
-
"UnsignedLongValue",
|
|
204
|
+
__all__: list[str] = [
|
|
452
205
|
"BinaryValue",
|
|
453
|
-
"
|
|
454
|
-
"IntegerValue",
|
|
455
|
-
"LongValue",
|
|
456
|
-
"HugeIntegerValue",
|
|
457
|
-
"FloatValue",
|
|
458
|
-
"DoubleValue",
|
|
459
|
-
"DecimalValue",
|
|
460
|
-
"StringValue",
|
|
461
|
-
"UUIDValue",
|
|
206
|
+
"BinderException",
|
|
462
207
|
"BitValue",
|
|
463
208
|
"BlobValue",
|
|
209
|
+
"BooleanValue",
|
|
210
|
+
"CSVLineTerminator",
|
|
211
|
+
"CaseExpression",
|
|
212
|
+
"CatalogException",
|
|
213
|
+
"CoalesceOperator",
|
|
214
|
+
"ColumnExpression",
|
|
215
|
+
"ConnectionException",
|
|
216
|
+
"ConstantExpression",
|
|
217
|
+
"ConstraintException",
|
|
218
|
+
"ConversionException",
|
|
219
|
+
"DataError",
|
|
220
|
+
"DatabaseError",
|
|
464
221
|
"DateValue",
|
|
222
|
+
"DecimalValue",
|
|
223
|
+
"DefaultExpression",
|
|
224
|
+
"DependencyException",
|
|
225
|
+
"DoubleValue",
|
|
226
|
+
"DuckDBPyConnection",
|
|
227
|
+
"DuckDBPyRelation",
|
|
228
|
+
"Error",
|
|
229
|
+
"ExpectedResultType",
|
|
230
|
+
"ExplainType",
|
|
231
|
+
"Expression",
|
|
232
|
+
"FatalException",
|
|
233
|
+
"FloatValue",
|
|
234
|
+
"FunctionExpression",
|
|
235
|
+
"HTTPException",
|
|
236
|
+
"HugeIntegerValue",
|
|
237
|
+
"IOException",
|
|
238
|
+
"IntegerValue",
|
|
239
|
+
"IntegrityError",
|
|
240
|
+
"InternalError",
|
|
241
|
+
"InternalException",
|
|
242
|
+
"InterruptException",
|
|
465
243
|
"IntervalValue",
|
|
466
|
-
"
|
|
467
|
-
"
|
|
244
|
+
"InvalidInputException",
|
|
245
|
+
"InvalidTypeException",
|
|
246
|
+
"LambdaExpression",
|
|
247
|
+
"ListValue",
|
|
248
|
+
"LongValue",
|
|
249
|
+
"MapValue",
|
|
250
|
+
"NotImplementedException",
|
|
251
|
+
"NotSupportedError",
|
|
252
|
+
"NullValue",
|
|
253
|
+
"OperationalError",
|
|
254
|
+
"OutOfMemoryException",
|
|
255
|
+
"OutOfRangeException",
|
|
256
|
+
"ParserException",
|
|
257
|
+
"PermissionException",
|
|
258
|
+
"ProgrammingError",
|
|
259
|
+
"PythonExceptionHandling",
|
|
260
|
+
"RenderMode",
|
|
261
|
+
"SQLExpression",
|
|
262
|
+
"SequenceException",
|
|
263
|
+
"SerializationException",
|
|
264
|
+
"ShortValue",
|
|
265
|
+
"StarExpression",
|
|
266
|
+
"Statement",
|
|
267
|
+
"StatementType",
|
|
268
|
+
"StringValue",
|
|
269
|
+
"StructValue",
|
|
270
|
+
"SyntaxException",
|
|
271
|
+
"TimeTimeZoneValue",
|
|
272
|
+
"TimeValue",
|
|
468
273
|
"TimestampMilisecondValue",
|
|
469
274
|
"TimestampNanosecondValue",
|
|
275
|
+
"TimestampSecondValue",
|
|
470
276
|
"TimestampTimeZoneValue",
|
|
471
|
-
"
|
|
472
|
-
"
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
277
|
+
"TimestampValue",
|
|
278
|
+
"TransactionException",
|
|
279
|
+
"TypeMismatchException",
|
|
280
|
+
"UUIDValue",
|
|
281
|
+
"UnionType",
|
|
282
|
+
"UnsignedBinaryValue",
|
|
283
|
+
"UnsignedHugeIntegerValue",
|
|
284
|
+
"UnsignedIntegerValue",
|
|
285
|
+
"UnsignedLongValue",
|
|
286
|
+
"UnsignedShortValue",
|
|
287
|
+
"Value",
|
|
288
|
+
"Warning",
|
|
289
|
+
"__formatted_python_version__",
|
|
290
|
+
"__git_revision__",
|
|
291
|
+
"__interactive__",
|
|
292
|
+
"__jupyter__",
|
|
293
|
+
"__standard_vector_size__",
|
|
294
|
+
"__version__",
|
|
295
|
+
"_clean_default_connection",
|
|
296
|
+
"aggregate",
|
|
297
|
+
"alias",
|
|
298
|
+
"apilevel",
|
|
299
|
+
"append",
|
|
300
|
+
"array_type",
|
|
301
|
+
"arrow",
|
|
302
|
+
"begin",
|
|
303
|
+
"checkpoint",
|
|
304
|
+
"close",
|
|
305
|
+
"commit",
|
|
306
|
+
"connect",
|
|
307
|
+
"create_function",
|
|
308
|
+
"cursor",
|
|
309
|
+
"decimal_type",
|
|
310
|
+
"default_connection",
|
|
311
|
+
"description",
|
|
312
|
+
"df",
|
|
313
|
+
"distinct",
|
|
314
|
+
"dtype",
|
|
315
|
+
"duplicate",
|
|
316
|
+
"enum_type",
|
|
317
|
+
"execute",
|
|
318
|
+
"executemany",
|
|
319
|
+
"extract_statements",
|
|
320
|
+
"fetch_arrow_table",
|
|
321
|
+
"fetch_df",
|
|
322
|
+
"fetch_df_chunk",
|
|
323
|
+
"fetch_record_batch",
|
|
324
|
+
"fetchall",
|
|
325
|
+
"fetchdf",
|
|
326
|
+
"fetchmany",
|
|
327
|
+
"fetchnumpy",
|
|
328
|
+
"fetchone",
|
|
329
|
+
"filesystem_is_registered",
|
|
330
|
+
"filter",
|
|
331
|
+
"from_arrow",
|
|
332
|
+
"from_csv_auto",
|
|
333
|
+
"from_df",
|
|
334
|
+
"from_parquet",
|
|
335
|
+
"from_query",
|
|
336
|
+
"get_table_names",
|
|
337
|
+
"install_extension",
|
|
338
|
+
"interrupt",
|
|
339
|
+
"limit",
|
|
340
|
+
"list_filesystems",
|
|
341
|
+
"list_type",
|
|
342
|
+
"load_extension",
|
|
343
|
+
"map_type",
|
|
344
|
+
"order",
|
|
345
|
+
"paramstyle",
|
|
346
|
+
"paramstyle",
|
|
347
|
+
"pl",
|
|
348
|
+
"project",
|
|
349
|
+
"query",
|
|
350
|
+
"query_df",
|
|
351
|
+
"query_progress",
|
|
352
|
+
"read_csv",
|
|
353
|
+
"read_json",
|
|
354
|
+
"read_parquet",
|
|
355
|
+
"register",
|
|
356
|
+
"register_filesystem",
|
|
357
|
+
"remove_function",
|
|
358
|
+
"rollback",
|
|
359
|
+
"row_type",
|
|
360
|
+
"rowcount",
|
|
361
|
+
"set_default_connection",
|
|
362
|
+
"sql",
|
|
363
|
+
"sqltype",
|
|
364
|
+
"string_type",
|
|
365
|
+
"struct_type",
|
|
366
|
+
"table",
|
|
367
|
+
"table_function",
|
|
368
|
+
"tf",
|
|
369
|
+
"threadsafety",
|
|
370
|
+
"threadsafety",
|
|
371
|
+
"token_type",
|
|
372
|
+
"tokenize",
|
|
373
|
+
"torch",
|
|
374
|
+
"type",
|
|
375
|
+
"union_type",
|
|
376
|
+
"unregister",
|
|
377
|
+
"unregister_filesystem",
|
|
378
|
+
"values",
|
|
379
|
+
"view",
|
|
380
|
+
"write_csv",
|
|
381
|
+
]
|