@duckdb/node-bindings 1.1.2-alpha.4 → 1.1.3-alpha.10
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/LICENSE +1 -1
- package/README.md +2 -0
- package/duckdb.d.ts +40 -4
- package/package.json +6 -4
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright 2018-
|
|
1
|
+
Copyright 2018-2025 Stichting DuckDB Foundation
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
package/README.md
CHANGED
package/duckdb.d.ts
CHANGED
|
@@ -246,7 +246,7 @@ export function interrupt(connection: Connection): void;
|
|
|
246
246
|
export function query_progress(connection: Connection): QueryProgress;
|
|
247
247
|
|
|
248
248
|
// DUCKDB_API void duckdb_disconnect(duckdb_connection *connection);
|
|
249
|
-
|
|
249
|
+
export function disconnect(connection: Connection): void;
|
|
250
250
|
|
|
251
251
|
// DUCKDB_API const char *duckdb_library_version();
|
|
252
252
|
export function library_version(): string;
|
|
@@ -288,7 +288,10 @@ export function column_logical_type(result: Result, column_index: number): Logic
|
|
|
288
288
|
export function column_count(result: Result): number;
|
|
289
289
|
|
|
290
290
|
// #ifndef DUCKDB_API_NO_DEPRECATED
|
|
291
|
+
|
|
291
292
|
// DUCKDB_API idx_t duckdb_row_count(duckdb_result *result);
|
|
293
|
+
export function row_count(result: Result): number;
|
|
294
|
+
|
|
292
295
|
// #endif
|
|
293
296
|
|
|
294
297
|
// DUCKDB_API idx_t duckdb_rows_changed(duckdb_result *result);
|
|
@@ -306,9 +309,16 @@ export function rows_changed(result: Result): number;
|
|
|
306
309
|
// not exposed: query, execute_prepared, and execute_pending reject promise with error
|
|
307
310
|
|
|
308
311
|
// #ifndef DUCKDB_API_NO_DEPRECATED
|
|
312
|
+
|
|
309
313
|
// DUCKDB_API duckdb_data_chunk duckdb_result_get_chunk(duckdb_result result, idx_t chunk_index);
|
|
314
|
+
export function result_get_chunk(result: Result, chunkIndex: number): DataChunk;
|
|
315
|
+
|
|
310
316
|
// DUCKDB_API bool duckdb_result_is_streaming(duckdb_result result);
|
|
317
|
+
export function result_is_streaming(result: Result): boolean;
|
|
318
|
+
|
|
311
319
|
// DUCKDB_API idx_t duckdb_result_chunk_count(duckdb_result result);
|
|
320
|
+
export function result_chunk_count(result: Result): number;
|
|
321
|
+
|
|
312
322
|
// #endif
|
|
313
323
|
|
|
314
324
|
// DUCKDB_API duckdb_result_type duckdb_result_return_type(duckdb_result result);
|
|
@@ -510,7 +520,10 @@ export function bind_null(prepared_statement: PreparedStatement, index: number):
|
|
|
510
520
|
export function execute_prepared(prepared_statement: PreparedStatement): Promise<Result>;
|
|
511
521
|
|
|
512
522
|
// #ifndef DUCKDB_API_NO_DEPRECATED
|
|
523
|
+
|
|
513
524
|
// DUCKDB_API duckdb_state duckdb_execute_prepared_streaming(duckdb_prepared_statement prepared_statement, duckdb_result *out_result);
|
|
525
|
+
export function execute_prepared_streaming(prepared_statement: PreparedStatement): Promise<Result>;
|
|
526
|
+
|
|
514
527
|
// #endif
|
|
515
528
|
|
|
516
529
|
// DUCKDB_API idx_t duckdb_extract_statements(duckdb_connection connection, const char *query, duckdb_extracted_statements *out_extracted_statements);
|
|
@@ -529,7 +542,10 @@ export function extract_statements_error(extracted_statements: ExtractedStatemen
|
|
|
529
542
|
export function pending_prepared(prepared_statement: PreparedStatement): PendingResult;
|
|
530
543
|
|
|
531
544
|
// #ifndef DUCKDB_API_NO_DEPRECATED
|
|
545
|
+
|
|
532
546
|
// DUCKDB_API duckdb_state duckdb_pending_prepared_streaming(duckdb_prepared_statement prepared_statement, duckdb_pending_result *out_result);
|
|
547
|
+
export function pending_prepared_streaming(prepared_statement: PreparedStatement): PendingResult;
|
|
548
|
+
|
|
533
549
|
// #endif
|
|
534
550
|
|
|
535
551
|
// DUCKDB_API void duckdb_destroy_pending(duckdb_pending_result *pending_result);
|
|
@@ -824,7 +840,7 @@ export function vector_ensure_validity_writable(vector: Vector): void;
|
|
|
824
840
|
export function vector_assign_string_element(vector: Vector, index: number, str: string): void;
|
|
825
841
|
|
|
826
842
|
// DUCKDB_API void duckdb_vector_assign_string_element_len(duckdb_vector vector, idx_t index, const char *str, idx_t str_len);
|
|
827
|
-
|
|
843
|
+
export function vector_assign_string_element_len(vector: Vector, index: number, data: Uint8Array): void;
|
|
828
844
|
|
|
829
845
|
// DUCKDB_API duckdb_vector duckdb_list_vector_get_child(duckdb_vector vector);
|
|
830
846
|
export function list_vector_get_child(vector: Vector): Vector;
|
|
@@ -845,7 +861,7 @@ export function struct_vector_get_child(vector: Vector, index: number): Vector;
|
|
|
845
861
|
export function array_vector_get_child(vector: Vector): Vector;
|
|
846
862
|
|
|
847
863
|
// DUCKDB_API bool duckdb_validity_row_is_valid(uint64_t *validity, idx_t row);
|
|
848
|
-
export function validity_row_is_valid(validity: Uint8Array, row_index: number): boolean;
|
|
864
|
+
export function validity_row_is_valid(validity: Uint8Array | null, row_index: number): boolean;
|
|
849
865
|
|
|
850
866
|
// DUCKDB_API void duckdb_validity_set_row_validity(uint64_t *validity, idx_t row, bool valid);
|
|
851
867
|
export function validity_set_row_validity(validity: Uint8Array, row_index: number, valid: boolean): void;
|
|
@@ -1072,7 +1088,7 @@ export function append_data_chunk(appender: Appender, chunk: DataChunk): void;
|
|
|
1072
1088
|
// #endif
|
|
1073
1089
|
|
|
1074
1090
|
// DUCKDB_API duckdb_data_chunk duckdb_fetch_chunk(duckdb_result result);
|
|
1075
|
-
export function fetch_chunk(result: Result): Promise<DataChunk>;
|
|
1091
|
+
export function fetch_chunk(result: Result): Promise<DataChunk | null>;
|
|
1076
1092
|
|
|
1077
1093
|
// DUCKDB_API duckdb_cast_function duckdb_create_cast_function();
|
|
1078
1094
|
// DUCKDB_API void duckdb_cast_function_set_source_type(duckdb_cast_function cast_function, duckdb_logical_type source_type);
|
|
@@ -1094,3 +1110,23 @@ export function fetch_chunk(result: Result): Promise<DataChunk>;
|
|
|
1094
1110
|
* Used to read from `duckdb_string_t`s with non-inlined data that are embedded in VARCHAR, BLOB, and BIT vectors.
|
|
1095
1111
|
*/
|
|
1096
1112
|
export function get_data_from_pointer(array_buffer: ArrayBuffer, pointer_offset: number, byte_count: number): Uint8Array;
|
|
1113
|
+
|
|
1114
|
+
// ADDED
|
|
1115
|
+
/**
|
|
1116
|
+
* Copy `source_byte_count` bytes from `source_buffer` at `source_byte_offset` into `target_vector` at `target_byte_offset`.
|
|
1117
|
+
*
|
|
1118
|
+
* Used to write to data chunks.
|
|
1119
|
+
*
|
|
1120
|
+
* Performs an efficient-but-unsafe memory copy. Use with care.
|
|
1121
|
+
*/
|
|
1122
|
+
export function copy_data_to_vector(target_vector: Vector, target_byte_offset: number, source_buffer: ArrayBuffer, source_byte_offset: number, source_byte_count: number): void;
|
|
1123
|
+
|
|
1124
|
+
// ADDED
|
|
1125
|
+
/**
|
|
1126
|
+
* Copy `source_byte_count` bytes from `source_buffer` at `source_byte_offset` into the validity of `target_vector` at `target_byte_offset`.
|
|
1127
|
+
*
|
|
1128
|
+
* Used to write to data chunks.
|
|
1129
|
+
*
|
|
1130
|
+
* Performs an efficient-but-unsafe memory copy. Use with care.
|
|
1131
|
+
*/
|
|
1132
|
+
export function copy_data_to_vector_validity(target_vector: Vector, target_byte_offset: number, source_buffer: ArrayBuffer, source_byte_offset: number, source_byte_count: number): void;
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duckdb/node-bindings",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3-alpha.10",
|
|
4
4
|
"main": "./duckdb.js",
|
|
5
5
|
"types": "./duckdb.d.ts",
|
|
6
6
|
"optionalDependencies": {
|
|
7
|
-
"@duckdb/node-bindings-darwin-arm64": "1.1.
|
|
8
|
-
"@duckdb/node-bindings-linux-
|
|
9
|
-
"@duckdb/node-bindings-
|
|
7
|
+
"@duckdb/node-bindings-darwin-arm64": "1.1.3-alpha.10",
|
|
8
|
+
"@duckdb/node-bindings-linux-arm64": "1.1.3-alpha.10",
|
|
9
|
+
"@duckdb/node-bindings-darwin-x64": "1.1.3-alpha.10",
|
|
10
|
+
"@duckdb/node-bindings-linux-x64": "1.1.3-alpha.10",
|
|
11
|
+
"@duckdb/node-bindings-win32-x64": "1.1.3-alpha.10"
|
|
10
12
|
},
|
|
11
13
|
"repository": {
|
|
12
14
|
"type": "git",
|