@duckdb/node-api 1.2.1-alpha.17 → 1.2.2-alpha.18
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/README.md +18 -18
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,26 +4,26 @@ An API for using [DuckDB](https://duckdb.org/) in [Node](https://nodejs.org/).
|
|
|
4
4
|
|
|
5
5
|
This is a high-level API meant for applications.
|
|
6
6
|
It depends on low-level bindings that adhere closely to [DuckDB's C API](https://duckdb.org/docs/api/c/overview),
|
|
7
|
-
available separately as [@duckdb/
|
|
7
|
+
available separately as [@duckdb/node-bindings](https://www.npmjs.com/package/@duckdb/node-bindings).
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
|
-
### Main
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
### Main Differences from [duckdb-node](https://www.npmjs.com/package/duckdb)
|
|
12
|
+
* Native support for Promises; no need for separate [duckdb-async](https://www.npmjs.com/package/duckdb-async) wrapper.
|
|
13
|
+
* DuckDB-specific API; not based on the [SQLite Node API](https://www.npmjs.com/package/sqlite3).
|
|
14
|
+
* Lossless & efficent support for values of all [DuckDB data types](https://duckdb.org/docs/sql/data_types/overview).
|
|
15
|
+
* Wraps [released DuckDB binaries](https://github.com/duckdb/duckdb/releases) instead of rebuilding DuckDB.
|
|
16
|
+
* Built on [DuckDB's C API](https://duckdb.org/docs/api/c/overview); exposes more functionality.
|
|
17
17
|
|
|
18
18
|
### Roadmap
|
|
19
19
|
|
|
20
20
|
Some features are not yet complete:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
* Binding and appending the MAP and UNION data types
|
|
22
|
+
* Appending default values row-by-row
|
|
23
|
+
* User-defined types & functions
|
|
24
|
+
* Profiling info
|
|
25
|
+
* Table description
|
|
26
|
+
* APIs for Arrow
|
|
27
27
|
|
|
28
28
|
See the [issues list on GitHub](https://github.com/duckdb/duckdb-node-neo/issues)
|
|
29
29
|
for the most up-to-date roadmap.
|
|
@@ -118,13 +118,13 @@ Connections will be disconnected automatically soon after their reference
|
|
|
118
118
|
is dropped, but you can also disconnect explicitly if and when you want:
|
|
119
119
|
|
|
120
120
|
```ts
|
|
121
|
-
connection.
|
|
121
|
+
connection.disconnectSync();
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
or, equivalently:
|
|
125
125
|
|
|
126
126
|
```ts
|
|
127
|
-
connection.
|
|
127
|
+
connection.closeSync();
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
### Run SQL
|
|
@@ -847,13 +847,13 @@ appender.appendInteger(123);
|
|
|
847
847
|
appender.appendVarchar('mallard');
|
|
848
848
|
appender.endRow();
|
|
849
849
|
|
|
850
|
-
appender.
|
|
850
|
+
appender.flushSync();
|
|
851
851
|
|
|
852
852
|
appender.appendInteger(17);
|
|
853
853
|
appender.appendVarchar('goose');
|
|
854
854
|
appender.endRow();
|
|
855
855
|
|
|
856
|
-
appender.
|
|
856
|
+
appender.closeSync(); // also flushes
|
|
857
857
|
```
|
|
858
858
|
|
|
859
859
|
### Append Data Chunk
|
|
@@ -878,7 +878,7 @@ chunk.setColumns([
|
|
|
878
878
|
// ]);
|
|
879
879
|
|
|
880
880
|
appender.appendDataChunk(chunk);
|
|
881
|
-
appender.
|
|
881
|
+
appender.flushSync();
|
|
882
882
|
```
|
|
883
883
|
|
|
884
884
|
See "Specifying Values" above for how to supply values to the appender.
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duckdb/node-api",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2-alpha.18",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@duckdb/node-bindings": "1.2.
|
|
8
|
+
"@duckdb/node-bindings": "1.2.2-alpha.18"
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|