@malloydata/db-trino 0.0.433 → 0.0.434
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/test.nonspec.js +1 -1
- package/dist/trino_connection.js +4 -4
- package/package.json +4 -4
package/dist/test.nonspec.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/*import {Trino, BasicAuth} from 'trino-client';
|
|
3
|
+
/*import {Trino, BasicAuth} from '@trinodb/trino-js-client';
|
|
4
4
|
import PrestoClient from '@prestodb/presto-js-client';
|
|
5
5
|
|
|
6
6
|
// function CallPresto(client: Client, query: string ) {
|
package/dist/trino_connection.js
CHANGED
|
@@ -10,7 +10,7 @@ const internal_1 = require("@malloydata/malloy/internal");
|
|
|
10
10
|
const connection_1 = require("@malloydata/malloy/connection");
|
|
11
11
|
const presto_js_client_1 = require("@prestodb/presto-js-client");
|
|
12
12
|
const crypto_1 = require("crypto");
|
|
13
|
-
const
|
|
13
|
+
const trino_js_client_1 = require("@trinodb/trino-js-client");
|
|
14
14
|
const result_to_querydata_1 = require("./result-to-querydata");
|
|
15
15
|
class PrestoRunner {
|
|
16
16
|
constructor(config) {
|
|
@@ -58,7 +58,7 @@ class PrestoRunner {
|
|
|
58
58
|
class TrinoRunner {
|
|
59
59
|
constructor(config) {
|
|
60
60
|
let server = config.server;
|
|
61
|
-
//
|
|
61
|
+
// the client has no separate port field — merge into the server URL
|
|
62
62
|
if (server && config.port) {
|
|
63
63
|
try {
|
|
64
64
|
const url = new URL(server);
|
|
@@ -71,13 +71,13 @@ class TrinoRunner {
|
|
|
71
71
|
// If server isn't a parseable URL, leave it as-is
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
this.client =
|
|
74
|
+
this.client = trino_js_client_1.Trino.create({
|
|
75
75
|
...config.extraConfig,
|
|
76
76
|
source: config.source,
|
|
77
77
|
catalog: config.catalog,
|
|
78
78
|
server,
|
|
79
79
|
schema: config.schema,
|
|
80
|
-
auth: new
|
|
80
|
+
auth: new trino_js_client_1.BasicAuth(config.user, config.password || ''),
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
async runSQL(sql, options = {}, queryMetadataComment = '') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-trino",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.434",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"prepublishOnly": "npm run build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@malloydata/malloy": "0.0.
|
|
26
|
+
"@malloydata/malloy": "0.0.434",
|
|
27
27
|
"@prestodb/presto-js-client": "^1.1.0",
|
|
28
|
+
"@trinodb/trino-js-client": "0.3.2",
|
|
28
29
|
"gaxios": "^4.2.0",
|
|
29
|
-
"luxon": "^3.7.2"
|
|
30
|
-
"trino-client": "^0.2.2"
|
|
30
|
+
"luxon": "^3.7.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/luxon": "^3.7.2"
|