duckdb 0.6.2-dev6.0 → 0.6.2-dev604.0
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/.mocharc.json +2 -2
- package/README.md +17 -0
- package/lib/duckdb.d.ts +29 -11
- package/lib/duckdb.js +6 -0
- package/package.json +1 -1
- package/src/duckdb.cpp +17094 -14736
- package/src/duckdb.hpp +9807 -9354
- package/src/parquet-amalgamation.cpp +35355 -35128
- package/src/parquet-amalgamation.hpp +46 -4
- package/test/{affected.test.js → affected.test.ts} +8 -10
- package/test/{arrow.test.js → arrow.test.ts} +12 -11
- package/test/{data_type_support.test.js → data_type_support.test.ts} +36 -35
- package/test/{database_fail.test.js → database_fail.test.ts} +25 -24
- package/test/{each.test.js → each.test.ts} +10 -9
- package/test/{exec.test.js → exec.test.ts} +7 -6
- package/test/{extension.test.js → extension.test.ts} +20 -19
- package/test/{interrupt.test.js → interrupt.test.ts} +7 -7
- package/test/{jsdoc.test.js → jsdoc.test.ts} +19 -20
- package/test/{named_columns.test.js → named_columns.test.ts} +4 -6
- package/test/{null_error.test.js → null_error.test.ts} +5 -6
- package/test/{open_close.test.js → open_close.test.ts} +10 -10
- package/test/{parallel_insert.test.js → parallel_insert.test.ts} +6 -7
- package/test/{parquet.js → parquet.test.ts} +2 -4
- package/test/{pathnames.test.js → pathnames.test.ts} +24 -22
- package/test/{prepare.test.js → prepare.test.ts} +53 -50
- package/test/{query_result.test.js → query_result.test.ts} +4 -4
- package/test/{serialization.test.js → serialization.test.ts} +10 -9
- package/test/support/helper.ts +42 -0
- package/test/{syntax_error.test.js → syntax_error.test.ts} +4 -4
- package/test/{udf.test.js → udf.test.ts} +26 -25
- package/test/{unicode.test.js → unicode.test.ts} +23 -22
- package/test/support/helper.js +0 -37
package/.mocharc.json
CHANGED
package/README.md
CHANGED
|
@@ -99,3 +99,20 @@ var stmt = con.prepare('select ?::INTEGER as fortytwo', function(err, stmt) {
|
|
|
99
99
|
});
|
|
100
100
|
});
|
|
101
101
|
```
|
|
102
|
+
|
|
103
|
+
## Development
|
|
104
|
+
|
|
105
|
+
### First install:
|
|
106
|
+
|
|
107
|
+
To install all the dev dependencies of the project, navigate over to `tools/nodejs` and run `npm install` (this uses package.json)
|
|
108
|
+
You might want to add the `--ignore-scripts` option if you don't care about building the package for now and just want to install the dependencies.
|
|
109
|
+
|
|
110
|
+
### Tests:
|
|
111
|
+
Tests are located in `tools/nodejs/test` and can be run with `npm test`
|
|
112
|
+
To run a single test, you can use `npm test -- --grep "name of test as given in describe"`
|
|
113
|
+
|
|
114
|
+
### Additional notes:
|
|
115
|
+
To build the NodeJS package from source, when on Windows, requires the following extra steps:
|
|
116
|
+
- Set `OPENSSL_ROOT_DIR` to the root directory of an OpenSSL installation
|
|
117
|
+
- Supply the `STATIC_OPENSSL=1` option when executing `make`, or set `-DOPENSSL_USE_STATIC_LIBS=1` manually when calling `cmake`
|
|
118
|
+
|
package/lib/duckdb.d.ts
CHANGED
|
@@ -49,15 +49,16 @@ export class QueryResult {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export class Database {
|
|
52
|
-
constructor(path: string, accessMode?: number, callback?: Callback<any>);
|
|
52
|
+
constructor(path: string, accessMode?: number | Record<string,string>, callback?: Callback<any>);
|
|
53
|
+
constructor(path: string, callback?: Callback<any>);
|
|
53
54
|
|
|
54
|
-
close(callback
|
|
55
|
+
close(callback?: Callback<void>): void;
|
|
55
56
|
|
|
56
57
|
connect(): Connection;
|
|
57
58
|
|
|
58
|
-
all(sql: string, ...args: [...any, Callback<TableData>] | []):
|
|
59
|
-
arrowIPCAll(sql: string, ...args: [...any, Callback<
|
|
60
|
-
each(sql: string, ...args: [...any, Callback<RowData>] | []):
|
|
59
|
+
all(sql: string, ...args: [...any, Callback<TableData>] | []): this;
|
|
60
|
+
arrowIPCAll(sql: string, ...args: [...any, Callback<QueryResult>] | []): void;
|
|
61
|
+
each(sql: string, ...args: [...any, Callback<RowData>] | []): this;
|
|
61
62
|
exec(sql: string, ...args: [...any, Callback<void>] | []): void;
|
|
62
63
|
|
|
63
64
|
prepare(sql: string, ...args: [...any, Callback<Statement>] | []): Statement;
|
|
@@ -71,21 +72,36 @@ export class Database {
|
|
|
71
72
|
unregister_udf(name: string, callback: Callback<any>): void;
|
|
72
73
|
|
|
73
74
|
stream(sql: any, ...args: any[]): QueryResult;
|
|
74
|
-
arrowIPCStream(sql: any, ...args: any[]): QueryResult
|
|
75
|
+
arrowIPCStream(sql: any, ...args: any[]): Promise<QueryResult>;
|
|
76
|
+
|
|
77
|
+
serialize(done?: Callback<void>): void;
|
|
78
|
+
parallelize(done?: Callback<void>): void;
|
|
79
|
+
wait(done: Callback<void>): void;
|
|
80
|
+
|
|
81
|
+
get(columnName: string, cb: Callback<RowData>): void;
|
|
82
|
+
get(columnName: string, num: number, cb: Callback<RowData>): void;
|
|
83
|
+
|
|
84
|
+
interrupt(): void;
|
|
85
|
+
|
|
86
|
+
register_buffer(name: string, array: ArrayLike<any>, force: boolean, callback?: Callback<void>): void;
|
|
87
|
+
|
|
88
|
+
unregister_buffer(name: string, callback?: Callback<void>): void;
|
|
75
89
|
}
|
|
76
90
|
|
|
77
91
|
export class Statement {
|
|
78
|
-
|
|
92
|
+
sql: string;
|
|
79
93
|
|
|
80
|
-
|
|
94
|
+
constructor(connection: Connection, sql: string);
|
|
81
95
|
|
|
82
|
-
|
|
96
|
+
all(...args: [...any, Callback<TableData>] | any[]): this;
|
|
83
97
|
|
|
84
|
-
|
|
98
|
+
arrowIPCAll(...args: [...any, Callback<TableData>] | any[]): void;
|
|
99
|
+
|
|
100
|
+
each(...args: [...any, Callback<RowData>] | any[]): this;
|
|
85
101
|
|
|
86
102
|
finalize(callback?: Callback<void>): void;
|
|
87
103
|
|
|
88
|
-
run(...args: [...any, Callback<void>] | []): Statement;
|
|
104
|
+
run(...args: [...any, Callback<void>] | any[]): Statement;
|
|
89
105
|
}
|
|
90
106
|
|
|
91
107
|
export const ERROR: number;
|
|
@@ -101,3 +117,5 @@ export const OPEN_READONLY: number;
|
|
|
101
117
|
export const OPEN_READWRITE: number;
|
|
102
118
|
|
|
103
119
|
export const OPEN_SHAREDCACHE: number;
|
|
120
|
+
|
|
121
|
+
export const INTERRUPT: number;
|
package/lib/duckdb.js
CHANGED