@malloydata/db-trino 0.0.239-dev250226010331 → 0.0.239-dev250227145856
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConnectionConfig, MalloyQueryData, PersistSQLResults, QueryData, QueryOptionsReader, QueryRunStats, RunSQLOptions, TrinoDialect, StructDef, TableSourceDef, SQLSourceDef, AtomicTypeDef, Dialect, FieldDef, TestableConnection } from '@malloydata/malloy';
|
|
1
|
+
import { ConnectionConfig, MalloyQueryData, PersistSQLResults, QueryData, QueryOptionsReader, QueryRunStats, RunSQLOptions, TrinoDialect, StructDef, TableSourceDef, SQLSourceDef, AtomicTypeDef, Dialect, FieldDef, TestableConnection, SQLSourceRequest } from '@malloydata/malloy';
|
|
2
2
|
import { BaseConnection } from '@malloydata/malloy/connection';
|
|
3
3
|
export interface TrinoManagerOptions {
|
|
4
4
|
credentials?: {
|
|
@@ -52,7 +52,7 @@ export declare abstract class TrinoPrestoConnection extends BaseConnection imple
|
|
|
52
52
|
schema: StructDef;
|
|
53
53
|
}>;
|
|
54
54
|
fetchTableSchema(tableKey: string, tablePath: string): Promise<TableSourceDef>;
|
|
55
|
-
fetchSelectSchema(sqlRef:
|
|
55
|
+
fetchSelectSchema(sqlRef: SQLSourceRequest): Promise<SQLSourceDef>;
|
|
56
56
|
protected abstract fillStructDefForSqlBlockSchema(sql: string, structDef: StructDef): Promise<void>;
|
|
57
57
|
protected executeAndWait(sqlBlock: string): Promise<void>;
|
|
58
58
|
malloyTypeFromTrinoType(trinoType: string): AtomicTypeDef;
|
package/dist/trino_connection.js
CHANGED
|
@@ -246,7 +246,13 @@ class TrinoPrestoConnection extends connection_1.BaseConnection {
|
|
|
246
246
|
return structDef;
|
|
247
247
|
}
|
|
248
248
|
async fetchSelectSchema(sqlRef) {
|
|
249
|
-
const structDef = {
|
|
249
|
+
const structDef = {
|
|
250
|
+
type: 'sql_select',
|
|
251
|
+
...sqlRef,
|
|
252
|
+
dialect: this.dialectName,
|
|
253
|
+
fields: [],
|
|
254
|
+
name: (0, malloy_1.sqlKey)(sqlRef.connection, sqlRef.selectStr),
|
|
255
|
+
};
|
|
250
256
|
await this.fillStructDefForSqlBlockSchema(sqlRef.selectStr, structDef);
|
|
251
257
|
return structDef;
|
|
252
258
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-trino",
|
|
3
|
-
"version": "0.0.239-
|
|
3
|
+
"version": "0.0.239-dev250227145856",
|
|
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.239-
|
|
25
|
+
"@malloydata/malloy": "^0.0.239-dev250227145856",
|
|
26
26
|
"@prestodb/presto-js-client": "^1.0.0",
|
|
27
27
|
"gaxios": "^4.2.0",
|
|
28
28
|
"trino-client": "^0.2.2"
|