@malloydata/db-duckdb 0.0.24-dev230302183612 → 0.0.24-dev230302213535
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/dist/duckdb_common.js
CHANGED
|
@@ -35,6 +35,13 @@ const duckDBToMalloyTypes = {
|
|
|
35
35
|
BOOLEAN: 'boolean',
|
|
36
36
|
INTEGER: 'number',
|
|
37
37
|
};
|
|
38
|
+
const unquoteName = (name) => {
|
|
39
|
+
const match = /^"(.*)"$/.exec(name);
|
|
40
|
+
if (match) {
|
|
41
|
+
return match[1].replace('""', '"');
|
|
42
|
+
}
|
|
43
|
+
return name;
|
|
44
|
+
};
|
|
38
45
|
class DuckDBCommon {
|
|
39
46
|
constructor(queryOptions) {
|
|
40
47
|
this.queryOptions = queryOptions;
|
|
@@ -161,8 +168,10 @@ class DuckDBCommon {
|
|
|
161
168
|
return ret;
|
|
162
169
|
}
|
|
163
170
|
fillStructDefFromTypeMap(structDef, typeMap) {
|
|
164
|
-
for (const
|
|
165
|
-
let duckDBType = typeMap[
|
|
171
|
+
for (const fieldName in typeMap) {
|
|
172
|
+
let duckDBType = typeMap[fieldName];
|
|
173
|
+
// Remove quotes from field name
|
|
174
|
+
const name = unquoteName(fieldName);
|
|
166
175
|
// Remove DECIMAL(x,y) precision to simplify lookup
|
|
167
176
|
duckDBType = duckDBType.replace(/^DECIMAL\(\d+,\d+\)/g, 'DECIMAL');
|
|
168
177
|
let malloyType = duckDBToMalloyTypes[duckDBType];
|
|
@@ -242,6 +242,7 @@ class DuckDBWASMConnection extends duckdb_common_1.DuckDBCommon {
|
|
|
242
242
|
}
|
|
243
243
|
async registerRemoteTable(tableName, url) {
|
|
244
244
|
var _a;
|
|
245
|
+
this.remoteFileStatus[tableName] = true;
|
|
245
246
|
(_a = this.database) === null || _a === void 0 ? void 0 : _a.registerFileURL(tableName, url, duckdb.DuckDBDataProtocol.HTTP, true);
|
|
246
247
|
}
|
|
247
248
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-duckdb",
|
|
3
|
-
"version": "0.0.24-
|
|
3
|
+
"version": "0.0.24-dev230302213535",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"prepublishOnly": "npm run build"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@duckdb/duckdb-wasm": "
|
|
44
|
-
"@malloydata/malloy": "^0.0.24-
|
|
45
|
-
"apache-arrow": "^
|
|
46
|
-
"duckdb": "0.
|
|
43
|
+
"@duckdb/duckdb-wasm": "1.24.0",
|
|
44
|
+
"@malloydata/malloy": "^0.0.24-dev230302213535",
|
|
45
|
+
"apache-arrow": "^11.0.0",
|
|
46
|
+
"duckdb": "0.7.1",
|
|
47
47
|
"web-worker": "^1.2.0"
|
|
48
48
|
}
|
|
49
49
|
}
|