@malloydata/db-trino 0.0.222-dev241211201726 → 0.0.222-dev241211235345

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/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { TrinoConnection } from './trino_connection';
2
- export { PrestoConnection } from './trino_connection';
1
+ export type { BaseRunner } from './trino_connection';
2
+ export { PrestoConnection, PrestoExplainParser, TrinoConnection, TrinoPrestoConnection, } from './trino_connection';
3
3
  export { TrinoExecutor } from './trino_executor';
package/dist/index.js CHANGED
@@ -22,11 +22,12 @@
22
22
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
  */
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.TrinoExecutor = exports.PrestoConnection = exports.TrinoConnection = void 0;
25
+ exports.TrinoExecutor = exports.TrinoPrestoConnection = exports.TrinoConnection = exports.PrestoExplainParser = exports.PrestoConnection = void 0;
26
26
  var trino_connection_1 = require("./trino_connection");
27
+ Object.defineProperty(exports, "PrestoConnection", { enumerable: true, get: function () { return trino_connection_1.PrestoConnection; } });
28
+ Object.defineProperty(exports, "PrestoExplainParser", { enumerable: true, get: function () { return trino_connection_1.PrestoExplainParser; } });
27
29
  Object.defineProperty(exports, "TrinoConnection", { enumerable: true, get: function () { return trino_connection_1.TrinoConnection; } });
28
- var trino_connection_2 = require("./trino_connection");
29
- Object.defineProperty(exports, "PrestoConnection", { enumerable: true, get: function () { return trino_connection_2.PrestoConnection; } });
30
+ Object.defineProperty(exports, "TrinoPrestoConnection", { enumerable: true, get: function () { return trino_connection_1.TrinoPrestoConnection; } });
30
31
  var trino_executor_1 = require("./trino_executor");
31
32
  Object.defineProperty(exports, "TrinoExecutor", { enumerable: true, get: function () { return trino_executor_1.TrinoExecutor; } });
32
33
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { Connection, ConnectionConfig, MalloyQueryData, PersistSQLResults, QueryData, QueryOptionsReader, QueryRunStats, RunSQLOptions, TrinoDialect, StructDef, TableSourceDef, SQLSourceDef, AtomicTypeDef, FieldDef } from '@malloydata/malloy';
1
+ import { Connection, ConnectionConfig, MalloyQueryData, PersistSQLResults, QueryData, QueryOptionsReader, QueryRunStats, RunSQLOptions, TrinoDialect, StructDef, TableSourceDef, SQLSourceDef, AtomicTypeDef, Dialect, FieldDef, TinyParser } from '@malloydata/malloy';
2
2
  import { BaseConnection } from '@malloydata/malloy/connection';
3
3
  export interface TrinoManagerOptions {
4
4
  credentials?: {
@@ -75,3 +75,21 @@ export declare class TrinoConnection extends TrinoPrestoConnection {
75
75
  constructor(option: TrinoConnectionOptions, queryOptions?: QueryOptionsReader);
76
76
  protected fillStructDefForSqlBlockSchema(sql: string, structDef: StructDef): Promise<void>;
77
77
  }
78
+ /**
79
+ * A hand built parser for schema lines, roughly this grammar
80
+ * SCHEMA_LINE: - Output [PlanName N] [NAME_LIST] => [TYPE_LIST]
81
+ * NAME_LIST: NAME (, NAME)*
82
+ * TYPE_LIST: TYPE_SPEC (, TYPE_SPEC)*
83
+ * TYPE_SPEC: exprN ':' TYPE
84
+ * TYPE: REC_TYPE | ARRAY_TYPE | SQL_TYPE
85
+ * ARRAY_TYPE: ARRAY '(' TYPE ')'
86
+ * REC_TYPE: REC '(' "name" TYPE (, "name" TYPE)* ')'
87
+ */
88
+ export declare class PrestoExplainParser extends TinyParser {
89
+ readonly input: string;
90
+ readonly dialect: Dialect;
91
+ constructor(input: string, dialect: Dialect);
92
+ fieldNameList(): string[];
93
+ parseExplain(): FieldDef[];
94
+ typeDef(): AtomicTypeDef;
95
+ }
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
  */
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.TrinoConnection = exports.PrestoConnection = exports.TrinoPrestoConnection = void 0;
25
+ exports.PrestoExplainParser = exports.TrinoConnection = exports.PrestoConnection = exports.TrinoPrestoConnection = void 0;
26
26
  const malloy_1 = require("@malloydata/malloy");
27
27
  const connection_1 = require("@malloydata/malloy/connection");
28
28
  const presto_js_client_1 = require("@prestodb/presto-js-client");
@@ -542,4 +542,5 @@ class PrestoExplainParser extends malloy_1.TinyParser {
542
542
  throw this.parseError(`'${typToken.text}' unexpected while looking for a type`);
543
543
  }
544
544
  }
545
+ exports.PrestoExplainParser = PrestoExplainParser;
545
546
  //# sourceMappingURL=trino_connection.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/db-trino",
3
- "version": "0.0.222-dev241211201726",
3
+ "version": "0.0.222-dev241211235345",
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.222-dev241211201726",
25
+ "@malloydata/malloy": "^0.0.222-dev241211235345",
26
26
  "@prestodb/presto-js-client": "^1.0.0",
27
27
  "gaxios": "^4.2.0",
28
28
  "trino-client": "^0.2.2"