@duckdb/node-bindings 1.4.0-r.1 → 1.4.0-r.2
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.
- package/duckdb.d.ts +50 -3
- package/package.json +6 -6
package/duckdb.d.ts
CHANGED
|
@@ -292,10 +292,14 @@ export function disconnect_sync(connection: Connection): void;
|
|
|
292
292
|
|
|
293
293
|
// DUCKDB_C_API void duckdb_connection_get_client_context(duckdb_connection connection, duckdb_client_context *out_context);
|
|
294
294
|
|
|
295
|
+
// DUCKDB_C_API void duckdb_connection_get_arrow_options(duckdb_connection connection, duckdb_arrow_options *out_arrow_options);
|
|
296
|
+
|
|
295
297
|
// DUCKDB_C_API idx_t duckdb_client_context_get_connection_id(duckdb_client_context context);
|
|
296
298
|
|
|
297
299
|
// DUCKDB_C_API void duckdb_destroy_client_context(duckdb_client_context *context);
|
|
298
300
|
|
|
301
|
+
// DUCKDB_C_API void duckdb_destroy_arrow_options(duckdb_arrow_options *arrow_options);
|
|
302
|
+
|
|
299
303
|
// DUCKDB_C_API const char *duckdb_library_version();
|
|
300
304
|
export function library_version(): string;
|
|
301
305
|
|
|
@@ -316,6 +320,12 @@ export function set_config(config: Config, name: string, option: string): void;
|
|
|
316
320
|
// DUCKDB_C_API void duckdb_destroy_config(duckdb_config *config);
|
|
317
321
|
// not exposed: destroyed in finalizer
|
|
318
322
|
|
|
323
|
+
// DUCKDB_C_API duckdb_error_data duckdb_create_error_data(duckdb_error_type type, const char *message);
|
|
324
|
+
// DUCKDB_C_API void duckdb_destroy_error_data(duckdb_error_data *error_data);
|
|
325
|
+
// DUCKDB_C_API duckdb_error_type duckdb_error_data_error_type(duckdb_error_data error_data);
|
|
326
|
+
// DUCKDB_C_API const char *duckdb_error_data_message(duckdb_error_data error_data);
|
|
327
|
+
// DUCKDB_C_API bool duckdb_error_data_has_error(duckdb_error_data error_data);
|
|
328
|
+
|
|
319
329
|
// DUCKDB_C_API duckdb_state duckdb_query(duckdb_connection connection, const char *query, duckdb_result *out_result);
|
|
320
330
|
export function query(connection: Connection, query: string): Promise<Result>;
|
|
321
331
|
|
|
@@ -334,6 +344,8 @@ export function result_statement_type(result: Result): StatementType;
|
|
|
334
344
|
// DUCKDB_C_API duckdb_logical_type duckdb_column_logical_type(duckdb_result *result, idx_t col);
|
|
335
345
|
export function column_logical_type(result: Result, column_index: number): LogicalType;
|
|
336
346
|
|
|
347
|
+
// DUCKDB_C_API duckdb_arrow_options duckdb_result_get_arrow_options(duckdb_result *result);
|
|
348
|
+
|
|
337
349
|
// DUCKDB_C_API idx_t duckdb_column_count(duckdb_result *result);
|
|
338
350
|
export function column_count(result: Result): number;
|
|
339
351
|
|
|
@@ -503,6 +515,11 @@ export function clear_bindings(prepared_statement: PreparedStatement): void;
|
|
|
503
515
|
// DUCKDB_C_API duckdb_statement_type duckdb_prepared_statement_type(duckdb_prepared_statement statement);
|
|
504
516
|
export function prepared_statement_type(prepared_statement: PreparedStatement): StatementType;
|
|
505
517
|
|
|
518
|
+
// DUCKDB_C_API idx_t duckdb_prepared_statement_column_count(duckdb_prepared_statement prepared_statement);
|
|
519
|
+
// DUCKDB_C_API const char *duckdb_prepared_statement_column_name(duckdb_prepared_statement prepared_statement, idx_t col_idx);
|
|
520
|
+
// DUCKDB_C_API duckdb_logical_type duckdb_prepared_statement_column_logical_type(duckdb_prepared_statement prepared_statement, idx_t col_idx);
|
|
521
|
+
// DUCKDB_C_API duckdb_type duckdb_prepared_statement_column_type(duckdb_prepared_statement prepared_statement, idx_t col_idx);
|
|
522
|
+
|
|
506
523
|
// DUCKDB_C_API duckdb_state duckdb_bind_value(duckdb_prepared_statement prepared_statement, idx_t param_idx, duckdb_value val);
|
|
507
524
|
export function bind_value(prepared_statement: PreparedStatement, index: number, value: Value): void;
|
|
508
525
|
|
|
@@ -688,6 +705,8 @@ export function create_date(input: Date_): Value;
|
|
|
688
705
|
// DUCKDB_C_API duckdb_value duckdb_create_time(duckdb_time input);
|
|
689
706
|
export function create_time(input: Time): Value;
|
|
690
707
|
|
|
708
|
+
// DUCKDB_C_API duckdb_value duckdb_create_time_ns(duckdb_time_ns input);
|
|
709
|
+
|
|
691
710
|
// DUCKDB_C_API duckdb_value duckdb_create_time_tz_value(duckdb_time_tz value);
|
|
692
711
|
export function create_time_tz_value(input: TimeTZ): Value;
|
|
693
712
|
|
|
@@ -769,6 +788,8 @@ export function get_date(value: Value): Date_;
|
|
|
769
788
|
// DUCKDB_C_API duckdb_time duckdb_get_time(duckdb_value val);
|
|
770
789
|
export function get_time(value: Value): Time;
|
|
771
790
|
|
|
791
|
+
// DUCKDB_C_API duckdb_time_ns duckdb_get_time_ns(duckdb_value val);
|
|
792
|
+
|
|
772
793
|
// DUCKDB_C_API duckdb_time_tz duckdb_get_time_tz(duckdb_value val);
|
|
773
794
|
export function get_time_tz(value: Value): TimeTZ;
|
|
774
795
|
|
|
@@ -1003,7 +1024,9 @@ export function struct_vector_get_child(vector: Vector, index: number): Vector;
|
|
|
1003
1024
|
// DUCKDB_C_API duckdb_vector duckdb_array_vector_get_child(duckdb_vector vector);
|
|
1004
1025
|
export function array_vector_get_child(vector: Vector): Vector;
|
|
1005
1026
|
|
|
1006
|
-
// DUCKDB_C_API void duckdb_slice_vector(duckdb_vector vector, duckdb_selection_vector
|
|
1027
|
+
// DUCKDB_C_API void duckdb_slice_vector(duckdb_vector vector, duckdb_selection_vector sel, idx_t len);
|
|
1028
|
+
|
|
1029
|
+
// DUCKDB_C_API void duckdb_vector_copy_sel(duckdb_vector src, duckdb_vector dst, duckdb_selection_vector sel, idx_t src_count, idx_t src_offset, idx_t dst_offset);
|
|
1007
1030
|
|
|
1008
1031
|
// DUCKDB_C_API void duckdb_vector_reference_value(duckdb_vector vector, duckdb_value value);
|
|
1009
1032
|
|
|
@@ -1050,6 +1073,7 @@ export function scalar_function_set_extra_info(scalar_function: ScalarFunction,
|
|
|
1050
1073
|
|
|
1051
1074
|
// DUCKDB_C_API void duckdb_scalar_function_set_bind(duckdb_scalar_function scalar_function, duckdb_scalar_function_bind_t bind);
|
|
1052
1075
|
// DUCKDB_C_API void duckdb_scalar_function_set_bind_data(duckdb_bind_info info, void *bind_data, duckdb_delete_callback_t destroy);
|
|
1076
|
+
// DUCKDB_C_API void duckdb_scalar_function_set_bind_data_copy(duckdb_bind_info info, duckdb_copy_callback_t copy);
|
|
1053
1077
|
// DUCKDB_C_API void duckdb_scalar_function_bind_set_error(duckdb_bind_info info, const char *error);
|
|
1054
1078
|
|
|
1055
1079
|
// DUCKDB_C_API void duckdb_scalar_function_set_function(duckdb_scalar_function scalar_function, duckdb_scalar_function_t function);
|
|
@@ -1061,6 +1085,7 @@ export function register_scalar_function(connection: Connection, scalar_function
|
|
|
1061
1085
|
// DUCKDB_C_API void *duckdb_scalar_function_get_extra_info(duckdb_function_info info);
|
|
1062
1086
|
export function scalar_function_get_extra_info(function_info: FunctionInfo): object | undefined;
|
|
1063
1087
|
|
|
1088
|
+
// DUCKDB_C_API void *duckdb_scalar_function_bind_get_extra_info(duckdb_bind_info info);
|
|
1064
1089
|
// DUCKDB_C_API void *duckdb_scalar_function_get_bind_data(duckdb_function_info info);
|
|
1065
1090
|
// DUCKDB_C_API void duckdb_scalar_function_get_client_context(duckdb_bind_info info, duckdb_client_context *out_context);
|
|
1066
1091
|
|
|
@@ -1072,9 +1097,12 @@ export function scalar_function_set_error(function_info: FunctionInfo, error: st
|
|
|
1072
1097
|
// DUCKDB_C_API duckdb_state duckdb_add_scalar_function_to_set(duckdb_scalar_function_set set, duckdb_scalar_function function);
|
|
1073
1098
|
// DUCKDB_C_API duckdb_state duckdb_register_scalar_function_set(duckdb_connection con, duckdb_scalar_function_set set);
|
|
1074
1099
|
|
|
1100
|
+
// DUCKDB_C_API idx_t duckdb_scalar_function_bind_get_argument_count(duckdb_bind_info info);
|
|
1101
|
+
// DUCKDB_C_API duckdb_expression duckdb_scalar_function_bind_get_argument(duckdb_bind_info info, idx_t index);
|
|
1102
|
+
|
|
1075
1103
|
// DUCKDB_C_API duckdb_selection_vector duckdb_create_selection_vector(idx_t size);
|
|
1076
|
-
// DUCKDB_C_API void duckdb_destroy_selection_vector(duckdb_selection_vector
|
|
1077
|
-
// DUCKDB_C_API sel_t *duckdb_selection_vector_get_data_ptr(duckdb_selection_vector
|
|
1104
|
+
// DUCKDB_C_API void duckdb_destroy_selection_vector(duckdb_selection_vector sel);
|
|
1105
|
+
// DUCKDB_C_API sel_t *duckdb_selection_vector_get_data_ptr(duckdb_selection_vector sel);
|
|
1078
1106
|
|
|
1079
1107
|
// DUCKDB_C_API duckdb_aggregate_function duckdb_create_aggregate_function();
|
|
1080
1108
|
// DUCKDB_C_API void duckdb_destroy_aggregate_function(duckdb_aggregate_function *aggregate_function);
|
|
@@ -1108,6 +1136,7 @@ export function scalar_function_set_error(function_info: FunctionInfo, error: st
|
|
|
1108
1136
|
// DUCKDB_C_API duckdb_state duckdb_register_table_function(duckdb_connection con, duckdb_table_function function);
|
|
1109
1137
|
|
|
1110
1138
|
// DUCKDB_C_API void *duckdb_bind_get_extra_info(duckdb_bind_info info);
|
|
1139
|
+
// DUCKDB_C_API void duckdb_table_function_get_client_context(duckdb_bind_info info, duckdb_client_context *out_context);
|
|
1111
1140
|
// DUCKDB_C_API void duckdb_bind_add_result_column(duckdb_bind_info info, const char *name, duckdb_logical_type type);
|
|
1112
1141
|
// DUCKDB_C_API idx_t duckdb_bind_get_parameter_count(duckdb_bind_info info);
|
|
1113
1142
|
// DUCKDB_C_API duckdb_value duckdb_bind_get_parameter(duckdb_bind_info info, idx_t index);
|
|
@@ -1147,14 +1176,20 @@ export function appender_create(connection: Connection, schema: string | null, t
|
|
|
1147
1176
|
// DUCKDB_C_API duckdb_state duckdb_appender_create_ext(duckdb_connection connection, const char *catalog, const char *schema, const char *table, duckdb_appender *out_appender);
|
|
1148
1177
|
export function appender_create_ext(connection: Connection, catalog: string | null, schema: string | null, table: string): Appender;
|
|
1149
1178
|
|
|
1179
|
+
// DUCKDB_C_API duckdb_state duckdb_appender_create_query(duckdb_connection connection, const char *query, idx_t column_count, duckdb_logical_type *types, const char *table_name, const char **column_names, duckdb_appender *out_appender);
|
|
1180
|
+
|
|
1150
1181
|
// DUCKDB_C_API idx_t duckdb_appender_column_count(duckdb_appender appender);
|
|
1151
1182
|
export function appender_column_count(appender: Appender): number;
|
|
1152
1183
|
|
|
1153
1184
|
// DUCKDB_C_API duckdb_logical_type duckdb_appender_column_type(duckdb_appender appender, idx_t col_idx);
|
|
1154
1185
|
export function appender_column_type(appender: Appender, column_index: number): LogicalType;
|
|
1155
1186
|
|
|
1187
|
+
// #ifndef DUCKDB_API_NO_DEPRECATED
|
|
1156
1188
|
// DUCKDB_C_API const char *duckdb_appender_error(duckdb_appender appender);
|
|
1157
1189
|
// not exposed: other appender functions throw
|
|
1190
|
+
// #endif
|
|
1191
|
+
|
|
1192
|
+
// DUCKDB_C_API duckdb_error_data duckdb_appender_error_data(duckdb_appender appender);
|
|
1158
1193
|
|
|
1159
1194
|
// DUCKDB_C_API duckdb_state duckdb_appender_flush(duckdb_appender appender);
|
|
1160
1195
|
export function appender_flush_sync(appender: Appender): void;
|
|
@@ -1255,6 +1290,12 @@ export function append_data_chunk(appender: Appender, chunk: DataChunk): void;
|
|
|
1255
1290
|
// DUCKDB_C_API duckdb_state duckdb_column_has_default(duckdb_table_description table_description, idx_t index, bool *out);
|
|
1256
1291
|
// DUCKDB_C_API char *duckdb_table_description_get_column_name(duckdb_table_description table_description, idx_t index);
|
|
1257
1292
|
|
|
1293
|
+
// DUCKDB_C_API duckdb_error_data duckdb_to_arrow_schema(duckdb_arrow_options arrow_options, duckdb_logical_type *types, const char **names, idx_t column_count, struct ArrowSchema *out_schema);
|
|
1294
|
+
// DUCKDB_C_API duckdb_error_data duckdb_data_chunk_to_arrow(duckdb_arrow_options arrow_options, duckdb_data_chunk chunk, struct ArrowArray *out_arrow_array);
|
|
1295
|
+
// DUCKDB_C_API duckdb_error_data duckdb_schema_from_arrow(duckdb_connection connection, struct ArrowSchema *schema, duckdb_arrow_converted_schema *out_types);
|
|
1296
|
+
// DUCKDB_C_API duckdb_error_data duckdb_data_chunk_from_arrow(duckdb_connection connection, struct ArrowArray *arrow_array, duckdb_arrow_converted_schema converted_schema, duckdb_data_chunk *out_chunk);
|
|
1297
|
+
// DUCKDB_C_API void duckdb_destroy_arrow_converted_schema(duckdb_arrow_converted_schema *arrow_converted_schema);
|
|
1298
|
+
|
|
1258
1299
|
// #ifndef DUCKDB_API_NO_DEPRECATED
|
|
1259
1300
|
// DUCKDB_C_API duckdb_state duckdb_query_arrow(duckdb_connection connection, const char *query, duckdb_arrow *out_result);
|
|
1260
1301
|
// DUCKDB_C_API duckdb_state duckdb_query_arrow_schema(duckdb_arrow result, duckdb_arrow_schema *out_schema);
|
|
@@ -1301,6 +1342,12 @@ export function fetch_chunk(result: Result): Promise<DataChunk | null>;
|
|
|
1301
1342
|
// DUCKDB_C_API duckdb_state duckdb_register_cast_function(duckdb_connection con, duckdb_cast_function cast_function);
|
|
1302
1343
|
// DUCKDB_C_API void duckdb_destroy_cast_function(duckdb_cast_function *cast_function);
|
|
1303
1344
|
|
|
1345
|
+
// DUCKDB_C_API void duckdb_destroy_expression(duckdb_expression *expr);
|
|
1346
|
+
// DUCKDB_C_API duckdb_logical_type duckdb_expression_return_type(duckdb_expression expr);
|
|
1347
|
+
// DUCKDB_C_API bool duckdb_expression_is_foldable(duckdb_expression expr);
|
|
1348
|
+
// DUCKDB_C_API duckdb_error_data duckdb_expression_fold(duckdb_client_context context, duckdb_expression expr, duckdb_value *out_value);
|
|
1349
|
+
|
|
1350
|
+
|
|
1304
1351
|
// ADDED
|
|
1305
1352
|
/**
|
|
1306
1353
|
* Read a pointer from `array_buffer` at `pointer_offset`, then read and return `byte_count` bytes from that pointer.
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duckdb/node-bindings",
|
|
3
|
-
"version": "1.4.0-r.
|
|
3
|
+
"version": "1.4.0-r.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./duckdb.js",
|
|
6
6
|
"types": "./duckdb.d.ts",
|
|
7
7
|
"optionalDependencies": {
|
|
8
|
-
"@duckdb/node-bindings-darwin-arm64": "1.4.0-r.
|
|
9
|
-
"@duckdb/node-bindings-darwin-x64": "1.4.0-r.
|
|
10
|
-
"@duckdb/node-bindings-linux-arm64": "1.4.0-r.
|
|
11
|
-
"@duckdb/node-bindings-linux-x64": "1.4.0-r.
|
|
12
|
-
"@duckdb/node-bindings-win32-x64": "1.4.0-r.
|
|
8
|
+
"@duckdb/node-bindings-darwin-arm64": "1.4.0-r.2",
|
|
9
|
+
"@duckdb/node-bindings-darwin-x64": "1.4.0-r.2",
|
|
10
|
+
"@duckdb/node-bindings-linux-arm64": "1.4.0-r.2",
|
|
11
|
+
"@duckdb/node-bindings-linux-x64": "1.4.0-r.2",
|
|
12
|
+
"@duckdb/node-bindings-win32-x64": "1.4.0-r.2"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|