@malloydata/db-trino 0.0.232-dev250118020814 → 0.0.232-dev250127220611
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.
|
@@ -19,7 +19,7 @@ export interface TrinoConnectionConfiguration {
|
|
|
19
19
|
}
|
|
20
20
|
export type TrinoConnectionOptions = ConnectionConfig;
|
|
21
21
|
export interface BaseRunner {
|
|
22
|
-
runSQL(sql: string, limit: number | undefined): Promise<{
|
|
22
|
+
runSQL(sql: string, limit: number | undefined, abortSignal?: AbortSignal): Promise<{
|
|
23
23
|
rows: unknown[][];
|
|
24
24
|
columns: {
|
|
25
25
|
name: string;
|
package/dist/trino_connection.js
CHANGED
|
@@ -40,7 +40,7 @@ class PrestoRunner {
|
|
|
40
40
|
extraHeaders: { 'X-Presto-Session': 'legacy_unnest=true' },
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
async runSQL(sql, limit) {
|
|
43
|
+
async runSQL(sql, limit, _abortSignal) {
|
|
44
44
|
let ret = undefined;
|
|
45
45
|
const q = limit ? `SELECT * FROM(${sql}) LIMIT ${limit}` : sql;
|
|
46
46
|
let error = undefined;
|
|
@@ -70,7 +70,7 @@ class TrinoRunner {
|
|
|
70
70
|
auth: new trino_client_1.BasicAuth(config.user, config.password || ''),
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
async runSQL(sql, limit) {
|
|
73
|
+
async runSQL(sql, limit, _abortSignal) {
|
|
74
74
|
var _a;
|
|
75
75
|
const result = await this.client.query(sql);
|
|
76
76
|
let queryResult = await result.next();
|
|
@@ -176,7 +176,7 @@ class TrinoPrestoConnection extends connection_1.BaseConnection {
|
|
|
176
176
|
async runSQL(sqlCommand, options = {},
|
|
177
177
|
// TODO(figutierrez): Use.
|
|
178
178
|
_rowIndex = 0) {
|
|
179
|
-
const r = await this.client.runSQL(sqlCommand, options.rowLimit);
|
|
179
|
+
const r = await this.client.runSQL(sqlCommand, options.rowLimit, options.abortSignal);
|
|
180
180
|
if (r.error) {
|
|
181
181
|
throw new Error(r.error);
|
|
182
182
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-trino",
|
|
3
|
-
"version": "0.0.232-
|
|
3
|
+
"version": "0.0.232-dev250127220611",
|
|
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.232-
|
|
25
|
+
"@malloydata/malloy": "^0.0.232-dev250127220611",
|
|
26
26
|
"@prestodb/presto-js-client": "^1.0.0",
|
|
27
27
|
"gaxios": "^4.2.0",
|
|
28
28
|
"trino-client": "^0.2.2"
|