@malloydata/db-duckdb 0.0.102-dev231115033625 → 0.0.102-dev231115181615
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.
|
@@ -67,15 +67,10 @@ class DuckDBConnection extends duckdb_common_1.DuckDBCommon {
|
|
|
67
67
|
if (this.workingDirectory) {
|
|
68
68
|
await this.runDuckDBQuery(`SET FILE_SEARCH_PATH='${this.workingDirectory}'`);
|
|
69
69
|
}
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"LOAD 'httpfs'",
|
|
75
|
-
"INSTALL 'icu'",
|
|
76
|
-
"LOAD 'icu'",
|
|
77
|
-
"SET TimeZone='UTC'",
|
|
78
|
-
];
|
|
70
|
+
for (const ext of ['json', 'httpfs', 'icu']) {
|
|
71
|
+
await this.loadExtension(ext);
|
|
72
|
+
}
|
|
73
|
+
const setupCmds = ["SET TimeZone='UTC'"];
|
|
79
74
|
for (const cmd of setupCmds) {
|
|
80
75
|
try {
|
|
81
76
|
await this.runDuckDBQuery(cmd);
|
|
@@ -100,6 +95,12 @@ class DuckDBConnection extends duckdb_common_1.DuckDBCommon {
|
|
|
100
95
|
reject(err);
|
|
101
96
|
}
|
|
102
97
|
else {
|
|
98
|
+
rows = JSON.parse(JSON.stringify(rows, (_key, value) => {
|
|
99
|
+
if (typeof value === 'bigint') {
|
|
100
|
+
return Number(value);
|
|
101
|
+
}
|
|
102
|
+
return value;
|
|
103
|
+
}));
|
|
103
104
|
resolve({
|
|
104
105
|
rows,
|
|
105
106
|
totalRows: rows.length,
|
|
@@ -184,6 +184,16 @@ class DuckDBWASMConnection extends duckdb_common_1.DuckDBCommon {
|
|
|
184
184
|
// for (const ext of ['json', 'httpfs', 'icu']) {
|
|
185
185
|
// await this.loadExtension(ext);
|
|
186
186
|
// }
|
|
187
|
+
const setupCmds = ["SET TimeZone='UTC'"];
|
|
188
|
+
for (const cmd of setupCmds) {
|
|
189
|
+
try {
|
|
190
|
+
await this.runDuckDBQuery(cmd);
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
// eslint-disable-next-line no-console
|
|
194
|
+
console.error(`duckdb setup ${cmd} => ${error}`);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
187
197
|
};
|
|
188
198
|
await this.connecting;
|
|
189
199
|
if (!this.isSetup) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-duckdb",
|
|
3
|
-
"version": "0.0.102-
|
|
3
|
+
"version": "0.0.102-dev231115181615",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"prepublishOnly": "npm run build"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@malloydata/duckdb-wasm": "0.0.
|
|
44
|
-
"@malloydata/malloy": "^0.0.102-
|
|
45
|
-
"@malloydata/malloy-interfaces": "^0.0.102-
|
|
46
|
-
"apache-arrow": "^
|
|
47
|
-
"duckdb": "0.
|
|
43
|
+
"@malloydata/duckdb-wasm": "0.0.6",
|
|
44
|
+
"@malloydata/malloy": "^0.0.102-dev231115181615",
|
|
45
|
+
"@malloydata/malloy-interfaces": "^0.0.102-dev231115181615",
|
|
46
|
+
"apache-arrow": "^13.0.0",
|
|
47
|
+
"duckdb": "0.9.2",
|
|
48
48
|
"web-worker": "^1.2.0"
|
|
49
49
|
}
|
|
50
50
|
}
|