@malloydata/db-trino 0.0.338 → 0.0.339
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/trino_connection.js +16 -3
- package/package.json +2 -2
package/dist/trino_connection.js
CHANGED
|
@@ -73,10 +73,24 @@ class PrestoRunner {
|
|
|
73
73
|
}
|
|
74
74
|
class TrinoRunner {
|
|
75
75
|
constructor(config) {
|
|
76
|
+
let server = config.server;
|
|
77
|
+
// trino-client has no separate port field — merge into the server URL
|
|
78
|
+
if (server && config.port) {
|
|
79
|
+
try {
|
|
80
|
+
const url = new URL(server);
|
|
81
|
+
if (!url.port) {
|
|
82
|
+
url.port = String(config.port);
|
|
83
|
+
server = url.toString().replace(/\/$/, '');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// If server isn't a parseable URL, leave it as-is
|
|
88
|
+
}
|
|
89
|
+
}
|
|
76
90
|
this.client = trino_client_1.Trino.create({
|
|
77
91
|
...config.extraConfig,
|
|
78
92
|
catalog: config.catalog,
|
|
79
|
-
server
|
|
93
|
+
server,
|
|
80
94
|
schema: config.schema,
|
|
81
95
|
auth: new trino_client_1.BasicAuth(config.user, config.password || ''),
|
|
82
96
|
});
|
|
@@ -166,9 +180,8 @@ class TrinoPrestoConnection extends connection_1.BaseConnection {
|
|
|
166
180
|
return true;
|
|
167
181
|
}
|
|
168
182
|
getDigest() {
|
|
169
|
-
var _a;
|
|
170
183
|
const { server, port, catalog, schema, user } = this.connectionConfig;
|
|
171
|
-
return (0, malloy_1.makeDigest)('trino', server
|
|
184
|
+
return (0, malloy_1.makeDigest)('trino', server, port !== undefined ? String(port) : undefined, catalog, schema, user, this.setupSQL);
|
|
172
185
|
}
|
|
173
186
|
get supportsNesting() {
|
|
174
187
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-trino",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.339",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"prepublishOnly": "npm run build"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@malloydata/malloy": "0.0.
|
|
25
|
+
"@malloydata/malloy": "0.0.339",
|
|
26
26
|
"@prestodb/presto-js-client": "^1.0.0",
|
|
27
27
|
"gaxios": "^4.2.0",
|
|
28
28
|
"luxon": "^3.5.0",
|