@malloydata/malloy 0.0.374 → 0.0.376

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.
@@ -8,9 +8,41 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.TinyParser = exports.TinyParseError = void 0;
10
10
  /**
11
- * Simple framework for writing schema parsers. The parsers using this felt
12
- * better than the more ad-hoc code they replaced, and are smaller than
13
- * using a parser generator.
11
+ * Tiny combined lexer/parser for short recursive-descent parsers.
12
+ *
13
+ * TinyParser is intentionally small and biased toward readability over
14
+ * framework features. It is primarily used for schema and type parsers where
15
+ * a hand-written parser is clearer than ad-hoc regex matching, but a parser
16
+ * generator would be overkill.
17
+ *
18
+ * Design goals:
19
+ * - Keep parser implementations short and readable.
20
+ * - Support custom tokenization rules per parser.
21
+ * - Make parser intent obvious at call sites.
22
+ * - Minimize hidden consumption and parser-state surprises.
23
+ *
24
+ * Core parser API:
25
+ * - peek(): inspect the next token without consuming it.
26
+ * - read(): consume and return the next token, regardless of type.
27
+ * - eof(): true if the next token is end-of-input.
28
+ * - expect(...types): consume a required sequence of token types.
29
+ * - expectText(...texts): consume a required sequence of token texts.
30
+ * - match(...types): consume an optional sequence of token types.
31
+ * - matchText(...texts): consume an optional sequence of token texts.
32
+ *
33
+ * Semantics:
34
+ * - expect*() is for required grammar and throws on failure.
35
+ * - match*() is for optional grammar and is atomic. If the full sequence does
36
+ * not match, nothing is consumed.
37
+ * - peek() remains available, but most optional syntax should prefer match*().
38
+ *
39
+ * Token rules are tested in order. The first matching rule wins.
40
+ *
41
+ * Special token rule names:
42
+ * - space: matched text is skipped and never returned.
43
+ * - char: matched text becomes both token.type and token.text.
44
+ * - q*: any token name starting with q is treated as quoted text and has its
45
+ * first and last characters stripped from token.text.
14
46
  *
15
47
  * NOTE: All parse errors are exceptions.
16
48
  */
@@ -19,17 +51,14 @@ class TinyParseError extends Error {
19
51
  exports.TinyParseError = TinyParseError;
20
52
  class TinyParser {
21
53
  /**
22
- * The token map is tested in order. Return TinyToken
23
- * is {type: tokenMapKey, text: matchingText }, except
24
- * for the special tokenMapKeys:
25
- * * space: skipped and never returned
26
- * * char: matched string return in both .type and .text
27
- * * q*: any token name starting with 'q' is assumed to be
28
- * a quoted string and the text will have the first and
29
- * last characters stripped
54
+ * The token map is tested in order and the first matching rule wins.
30
55
  */
31
56
  constructor(input, tokenMap) {
32
57
  this.input = input;
58
+ this.tokens = [];
59
+ this.tokenCursor = 0;
60
+ this.scanCursor = 0;
61
+ this.scanState = 'scanning';
33
62
  this.parseCursor = 0;
34
63
  this.tokenMap = tokenMap !== null && tokenMap !== void 0 ? tokenMap : {
35
64
  space: /^\s+/,
@@ -37,30 +66,29 @@ class TinyParser {
37
66
  id: /^\w+/,
38
67
  qstr: /^"\w+"/,
39
68
  };
40
- this.tokens = this.tokenize(input);
41
69
  }
42
70
  parseError(str) {
71
+ this.parseCursor = this.peek().cursor;
43
72
  const errText = `INTERNAL ERROR parsing schema: ${str}\n` +
44
73
  `${this.input}\n` +
45
74
  `${' '.repeat(this.parseCursor)}^`;
46
75
  return new TinyParseError(errText);
47
76
  }
48
77
  peek() {
49
- if (this.lookAhead) {
50
- return this.lookAhead;
51
- }
52
- else {
53
- const { value } = this.tokens.next();
54
- const peekVal = value !== null && value !== void 0 ? value : { type: 'eof', text: '' };
55
- this.lookAhead = peekVal;
56
- return peekVal;
57
- }
78
+ return this.peekAt(0);
79
+ }
80
+ read() {
81
+ return this.consume();
58
82
  }
59
- getNext() {
83
+ eof() {
84
+ return this.peek().type === 'eof';
85
+ }
86
+ peekAt(offset) {
60
87
  var _a;
61
- const next = (_a = this.lookAhead) !== null && _a !== void 0 ? _a : this.peek();
62
- this.lookAhead = undefined;
63
- return next;
88
+ this.fillBufferTo(this.tokenCursor + offset);
89
+ const token = (_a = this.tokens[this.tokenCursor + offset]) !== null && _a !== void 0 ? _a : this.eofToken();
90
+ this.parseCursor = token.cursor;
91
+ return token;
64
92
  }
65
93
  /**
66
94
  * Return next token, if any token types are passed, read and require those
@@ -68,43 +96,59 @@ class TinyParser {
68
96
  * @param types list of token types
69
97
  * @returns The last token read
70
98
  */
71
- next(...types) {
72
- if (types.length === 0)
73
- return this.getNext();
74
- let next = undefined;
75
- let expected = types[0];
99
+ expect(...types) {
100
+ if (types.length === 0) {
101
+ throw new Error('TinyParser.expect() requires at least one token type');
102
+ }
103
+ let next;
76
104
  for (const typ of types) {
77
- next = this.getNext();
78
- expected = typ;
105
+ next = this.peek();
79
106
  if (next.type !== typ) {
80
- next = undefined;
81
- break;
107
+ throw this.parseError(`Expected token type '${typ}'`);
82
108
  }
109
+ this.consume();
110
+ }
111
+ return next;
112
+ }
113
+ expectText(...texts) {
114
+ if (texts.length === 0) {
115
+ throw new Error('TinyParser.expectText() requires at least one token text');
83
116
  }
84
- if (next)
85
- return next;
86
- throw this.parseError(`Expected token type '${expected}'`);
87
- }
88
- nextText(...texts) {
89
- if (texts.length === 0)
90
- return this.getNext();
91
- let next = undefined;
92
- let expected = texts[0];
117
+ let next;
93
118
  for (const txt of texts) {
94
- next = this.getNext();
95
- expected = txt;
119
+ next = this.peek();
96
120
  if (next.text.toUpperCase() !== txt.toUpperCase()) {
97
- next = undefined;
98
- break;
121
+ throw this.parseError(`Expected '${txt}'`);
122
+ }
123
+ this.consume();
124
+ }
125
+ return next;
126
+ }
127
+ match(...types) {
128
+ if (types.length === 0) {
129
+ throw new Error('TinyParser.match() requires at least one token type');
130
+ }
131
+ for (let index = 0; index < types.length; index += 1) {
132
+ if (this.peekAt(index).type !== types[index]) {
133
+ return undefined;
99
134
  }
100
135
  }
101
- if (next)
102
- return next;
103
- throw this.parseError(`Expected '${expected}'`);
136
+ return this.consume(types.length);
137
+ }
138
+ matchText(...texts) {
139
+ if (texts.length === 0) {
140
+ throw new Error('TinyParser.matchText() requires at least one token text');
141
+ }
142
+ for (let index = 0; index < texts.length; index += 1) {
143
+ if (this.peekAt(index).text.toUpperCase() !== texts[index].toUpperCase()) {
144
+ return undefined;
145
+ }
146
+ }
147
+ return this.consume(texts.length);
104
148
  }
105
149
  skipTo(type) {
106
150
  for (;;) {
107
- const next = this.next();
151
+ const next = this.read();
108
152
  if (next.type === 'eof') {
109
153
  throw this.parseError(`Expected token '${type}`);
110
154
  }
@@ -114,41 +158,103 @@ class TinyParser {
114
158
  }
115
159
  }
116
160
  dump() {
117
- const p = this.parseCursor;
118
- const parts = [...this.tokenize(this.input)];
119
- this.parseCursor = p;
161
+ const parts = [];
162
+ let cursor = 0;
163
+ let state = 'scanning';
164
+ while (state !== 'done') {
165
+ const { token, nextCursor, nextState } = this.scanToken(cursor, state);
166
+ if (token.type === 'eof') {
167
+ break;
168
+ }
169
+ parts.push(token);
170
+ cursor = nextCursor;
171
+ state = nextState;
172
+ }
120
173
  return parts;
121
174
  }
122
- *tokenize(src) {
123
- const tokenList = this.tokenMap;
124
- while (this.parseCursor < src.length) {
125
- let notFound = true;
126
- for (const tokenType in tokenList) {
127
- const srcAtCursor = src.slice(this.parseCursor);
128
- const foundToken = srcAtCursor.match(tokenList[tokenType]);
175
+ fillBufferTo(index) {
176
+ while (this.tokens.length <= index) {
177
+ this.tokens.push(this.readNextToken());
178
+ }
179
+ }
180
+ consume(count = 1) {
181
+ let token = this.peek();
182
+ for (let index = 0; index < count; index += 1) {
183
+ token = this.peek();
184
+ this.tokenCursor += 1;
185
+ }
186
+ this.parseCursor = this.peek().cursor;
187
+ return token;
188
+ }
189
+ readNextToken() {
190
+ const { token, nextCursor, nextState } = this.scanToken(this.scanCursor, this.scanState);
191
+ this.scanCursor = nextCursor;
192
+ this.scanState = nextState;
193
+ return token;
194
+ }
195
+ scanToken(cursor, state) {
196
+ if (state === 'done') {
197
+ return {
198
+ token: this.eofToken(),
199
+ nextCursor: this.input.length,
200
+ nextState: 'done',
201
+ };
202
+ }
203
+ if (state === 'afterUnexpected' || cursor >= this.input.length) {
204
+ return {
205
+ token: this.eofToken(),
206
+ nextCursor: this.input.length,
207
+ nextState: 'done',
208
+ };
209
+ }
210
+ let nextCursor = cursor;
211
+ while (nextCursor < this.input.length) {
212
+ const srcAtCursor = this.input.slice(nextCursor);
213
+ let matched = false;
214
+ for (const tokenType in this.tokenMap) {
215
+ const foundToken = srcAtCursor.match(this.tokenMap[tokenType]);
129
216
  if (foundToken) {
130
- notFound = false;
217
+ matched = true;
131
218
  let tokenText = foundToken[0];
132
- const cursor = this.parseCursor;
133
- this.parseCursor += tokenText.length;
134
- if (tokenType !== 'space') {
135
- if (tokenType[0] === 'q') {
136
- tokenText = tokenText.slice(1, -1); // strip quotes
137
- }
138
- yield {
139
- cursor,
140
- type: tokenType === 'char' ? tokenText : tokenType,
141
- text: tokenText,
142
- };
219
+ const tokenCursor = nextCursor;
220
+ nextCursor += tokenText.length;
221
+ if (tokenType === 'space') {
143
222
  break;
144
223
  }
224
+ if (tokenType[0] === 'q') {
225
+ tokenText = tokenText.slice(1, -1);
226
+ }
227
+ return {
228
+ token: {
229
+ cursor: tokenCursor,
230
+ type: tokenType === 'char' ? tokenText : tokenType,
231
+ text: tokenText,
232
+ },
233
+ nextCursor,
234
+ nextState: 'scanning',
235
+ };
145
236
  }
146
237
  }
147
- if (notFound) {
148
- yield { cursor: this.parseCursor, type: 'unexpected token', text: src };
149
- return;
238
+ if (!matched) {
239
+ return {
240
+ token: {
241
+ cursor: nextCursor,
242
+ type: 'unexpected token',
243
+ text: this.input,
244
+ },
245
+ nextCursor: this.input.length,
246
+ nextState: 'afterUnexpected',
247
+ };
150
248
  }
151
249
  }
250
+ return {
251
+ token: this.eofToken(),
252
+ nextCursor: this.input.length,
253
+ nextState: 'done',
254
+ };
255
+ }
256
+ eofToken() {
257
+ return { cursor: this.input.length, type: 'eof', text: '' };
152
258
  }
153
259
  }
154
260
  exports.TinyParser = TinyParser;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { DuckDBDialect, StandardSQLDialect, TrinoDialect, PostgresDialect, SnowflakeDialect, MySQLDialect, DatabricksDialect, registerDialect, arg, qtz, overload, minScalar, anyExprType, minAggregate, maxScalar, sql, makeParam, param, variadicParam, literal, spread, Dialect, TinyParser, } from './dialect';
2
- export type { DialectFieldList, DialectFunctionOverloadDef, QueryInfo, MalloyStandardFunctionImplementations, DefinitionBlueprint, DefinitionBlueprintMap, OverloadedDefinitionBlueprint, TinyToken, } from './dialect';
1
+ export { DuckDBDialect, StandardSQLDialect, TrinoDialect, PostgresDialect, SnowflakeDialect, MySQLDialect, DatabricksDialect, registerDialect, arg, qtz, overload, minScalar, anyExprType, minAggregate, maxScalar, sql, makeParam, param, variadicParam, literal, spread, Dialect, } from './dialect';
2
+ export type { DialectFieldList, DialectFunctionOverloadDef, QueryInfo, MalloyStandardFunctionImplementations, DefinitionBlueprint, DefinitionBlueprintMap, OverloadedDefinitionBlueprint, } from './dialect';
3
3
  export type { QueryRecord, StructDef, TableSourceDef, SQLSourceDef, SourceDef, JoinFieldDef, NamedSourceDefs, MalloyQueryData, DateUnit, ExtractUnit, TimestampUnit, TemporalFieldType, QueryData, QueryValue, Expr, FilterCondition, Argument, Parameter, FieldDef, PipeSegment, QueryFieldDef, IndexFieldDef, TurtleDef, SearchValueMapResult, SearchIndexResult, ModelDef, Query, QueryResult, QueryResultDef, QueryRunStats, QueryScalar, NamedQueryDef, NamedModelObject, ExpressionType, FunctionDef, FunctionOverloadDef, FunctionParameterDef, ExpressionValueType, TypeDesc, FunctionParamTypeDesc, DocumentLocation, DocumentRange, DocumentPosition, Sampling, Annotation, BasicAtomicTypeDef, BasicAtomicDef, AtomicTypeDef, AtomicFieldDef, ArrayDef, ArrayTypeDef, RecordTypeDef, RepeatedRecordTypeDef, RecordDef, RepeatedRecordDef, RecordLiteralNode, StringLiteralNode, ArrayLiteralNode, SourceComponentInfo, DateLiteralNode, TimestampLiteralNode, TimestamptzLiteralNode, TimeLiteralExpr, TypecastExpr, BuildID, BuildManifest, BuildManifestEntry, VirtualMap, } from './model';
4
4
  export { isSourceDef, isAtomic, isBasicAtomic, isCompoundArrayData, isJoined, isJoinedSource, isSamplingEnable, isSamplingPercent, isSamplingRows, isRepeatedRecord, isBasicArray, mkArrayDef, mkFieldDef, expressionIsAggregate, expressionIsAnalytic, expressionIsCalculation, expressionIsScalar, expressionIsUngroupedAggregate, indent, composeSQLExpr, isTimestampUnit, isDateUnit, constantExprToSQL, } from './model';
5
5
  export { malloyToQuery, MalloyTranslator, } from './lang';
package/dist/index.js CHANGED
@@ -33,8 +33,8 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.Malloy = exports.Model = exports.MalloyTranslator = exports.malloyToQuery = exports.constantExprToSQL = exports.isDateUnit = exports.isTimestampUnit = exports.composeSQLExpr = exports.indent = exports.expressionIsUngroupedAggregate = exports.expressionIsScalar = exports.expressionIsCalculation = exports.expressionIsAnalytic = exports.expressionIsAggregate = exports.mkFieldDef = exports.mkArrayDef = exports.isBasicArray = exports.isRepeatedRecord = exports.isSamplingRows = exports.isSamplingPercent = exports.isSamplingEnable = exports.isJoinedSource = exports.isJoined = exports.isCompoundArrayData = exports.isBasicAtomic = exports.isAtomic = exports.isSourceDef = exports.TinyParser = exports.Dialect = exports.spread = exports.literal = exports.variadicParam = exports.param = exports.makeParam = exports.sql = exports.maxScalar = exports.minAggregate = exports.anyExprType = exports.minScalar = exports.overload = exports.qtz = exports.arg = exports.registerDialect = exports.DatabricksDialect = exports.MySQLDialect = exports.SnowflakeDialect = exports.PostgresDialect = exports.TrinoDialect = exports.StandardSQLDialect = exports.DuckDBDialect = void 0;
37
- exports.makeDigest = exports.EMPTY_BUILD_MANIFEST = exports.PersistSource = exports.annotationToTaglines = exports.annotationToTag = exports.sqlKey = exports.API = exports.sourceDefToSourceInfo = exports.modelDefToModelInfo = exports.toAsyncGenerator = exports.createConnectionsFromConfig = exports.getRegisteredConnectionTypes = exports.getConnectionTypeDisplayName = exports.getConnectionProperties = exports.registerConnectionType = exports.discoverConfig = exports.defaultConfigOverlays = exports.contextOverlay = exports.envOverlay = exports.MalloyConfig = exports.Manifest = exports.CacheManager = exports.InMemoryModelCache = exports.Explore = exports.DataWriter = exports.Parse = exports.JSONWriter = exports.CSVWriter = exports.QueryMaterializer = exports.Result = exports.PreparedResult = exports.TimestampTimeframe = exports.DateTimeframe = exports.SourceRelationship = exports.JoinRelationship = exports.MalloyError = exports.FixedConnectionMap = exports.InMemoryURLReader = exports.EmptyURLReader = exports.SingleConnectionRuntime = exports.ConnectionRuntime = exports.AtomicFieldType = exports.Runtime = void 0;
36
+ exports.Runtime = exports.Malloy = exports.Model = exports.MalloyTranslator = exports.malloyToQuery = exports.constantExprToSQL = exports.isDateUnit = exports.isTimestampUnit = exports.composeSQLExpr = exports.indent = exports.expressionIsUngroupedAggregate = exports.expressionIsScalar = exports.expressionIsCalculation = exports.expressionIsAnalytic = exports.expressionIsAggregate = exports.mkFieldDef = exports.mkArrayDef = exports.isBasicArray = exports.isRepeatedRecord = exports.isSamplingRows = exports.isSamplingPercent = exports.isSamplingEnable = exports.isJoinedSource = exports.isJoined = exports.isCompoundArrayData = exports.isBasicAtomic = exports.isAtomic = exports.isSourceDef = exports.Dialect = exports.spread = exports.literal = exports.variadicParam = exports.param = exports.makeParam = exports.sql = exports.maxScalar = exports.minAggregate = exports.anyExprType = exports.minScalar = exports.overload = exports.qtz = exports.arg = exports.registerDialect = exports.DatabricksDialect = exports.MySQLDialect = exports.SnowflakeDialect = exports.PostgresDialect = exports.TrinoDialect = exports.StandardSQLDialect = exports.DuckDBDialect = void 0;
37
+ exports.makeDigest = exports.EMPTY_BUILD_MANIFEST = exports.PersistSource = exports.annotationToTaglines = exports.annotationToTag = exports.sqlKey = exports.API = exports.sourceDefToSourceInfo = exports.modelDefToModelInfo = exports.toAsyncGenerator = exports.createConnectionsFromConfig = exports.getRegisteredConnectionTypes = exports.getConnectionTypeDisplayName = exports.getConnectionProperties = exports.registerConnectionType = exports.discoverConfig = exports.defaultConfigOverlays = exports.contextOverlay = exports.envOverlay = exports.MalloyConfig = exports.Manifest = exports.CacheManager = exports.InMemoryModelCache = exports.Explore = exports.DataWriter = exports.Parse = exports.JSONWriter = exports.CSVWriter = exports.QueryMaterializer = exports.Result = exports.PreparedResult = exports.TimestampTimeframe = exports.DateTimeframe = exports.SourceRelationship = exports.JoinRelationship = exports.MalloyError = exports.FixedConnectionMap = exports.InMemoryURLReader = exports.EmptyURLReader = exports.SingleConnectionRuntime = exports.ConnectionRuntime = exports.AtomicFieldType = void 0;
38
38
  /*
39
39
  * Copyright 2023 Google LLC
40
40
  *
@@ -80,7 +80,6 @@ Object.defineProperty(exports, "variadicParam", { enumerable: true, get: functio
80
80
  Object.defineProperty(exports, "literal", { enumerable: true, get: function () { return dialect_1.literal; } });
81
81
  Object.defineProperty(exports, "spread", { enumerable: true, get: function () { return dialect_1.spread; } });
82
82
  Object.defineProperty(exports, "Dialect", { enumerable: true, get: function () { return dialect_1.Dialect; } });
83
- Object.defineProperty(exports, "TinyParser", { enumerable: true, get: function () { return dialect_1.TinyParser; } });
84
83
  var model_1 = require("./model");
85
84
  Object.defineProperty(exports, "isSourceDef", { enumerable: true, get: function () { return model_1.isSourceDef; } });
86
85
  // Used in Composer Demo
@@ -0,0 +1,3 @@
1
+ export { mkArrayDef, mkArrayTypeDef, mkFieldDef, mkModelDef, mkQuerySourceDef, mkSQLSourceDef, mkTableSourceDef, pathToKey, } from './model';
2
+ export { TinyParseError, TinyParser } from './dialect/tiny_parser';
3
+ export type { TinyToken } from './dialect/tiny_parser';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright Contributors to the Malloy project
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.TinyParser = exports.TinyParseError = exports.pathToKey = exports.mkTableSourceDef = exports.mkSQLSourceDef = exports.mkQuerySourceDef = exports.mkModelDef = exports.mkFieldDef = exports.mkArrayTypeDef = exports.mkArrayDef = void 0;
8
+ // Unstable implementation-facing exports for Malloy packages, tests, and
9
+ // advanced integrations. Do not treat this surface as public API.
10
+ var model_1 = require("./model");
11
+ Object.defineProperty(exports, "mkArrayDef", { enumerable: true, get: function () { return model_1.mkArrayDef; } });
12
+ Object.defineProperty(exports, "mkArrayTypeDef", { enumerable: true, get: function () { return model_1.mkArrayTypeDef; } });
13
+ Object.defineProperty(exports, "mkFieldDef", { enumerable: true, get: function () { return model_1.mkFieldDef; } });
14
+ Object.defineProperty(exports, "mkModelDef", { enumerable: true, get: function () { return model_1.mkModelDef; } });
15
+ Object.defineProperty(exports, "mkQuerySourceDef", { enumerable: true, get: function () { return model_1.mkQuerySourceDef; } });
16
+ Object.defineProperty(exports, "mkSQLSourceDef", { enumerable: true, get: function () { return model_1.mkSQLSourceDef; } });
17
+ Object.defineProperty(exports, "mkTableSourceDef", { enumerable: true, get: function () { return model_1.mkTableSourceDef; } });
18
+ Object.defineProperty(exports, "pathToKey", { enumerable: true, get: function () { return model_1.pathToKey; } });
19
+ var tiny_parser_1 = require("./dialect/tiny_parser");
20
+ Object.defineProperty(exports, "TinyParseError", { enumerable: true, get: function () { return tiny_parser_1.TinyParseError; } });
21
+ Object.defineProperty(exports, "TinyParser", { enumerable: true, get: function () { return tiny_parser_1.TinyParser; } });
22
+ //# sourceMappingURL=internal.js.map
@@ -4,7 +4,7 @@ import { QueryQuery } from './query_query';
4
4
  import { QueryModelImpl } from './query_model_impl';
5
5
  export { QueryField, QueryStruct, QueryQuery, QueryModelImpl as QueryModel };
6
6
  export { getResultStructDefForQuery, getResultStructDefForView, } from './query_model_impl';
7
- export { indent, composeSQLExpr, makeDigest, mkModelDef } from './utils';
7
+ export { indent, composeSQLExpr, makeDigest, mkModelDef, pathToKey, } from './utils';
8
8
  export { constantExprToSQL } from './constant_expression_compiler';
9
9
  export { getCompiledSQL } from './sql_compiled';
10
10
  export { mkSourceID, mkBuildID, mkQuerySourceDef, mkSQLSourceDef, mkTableSourceDef, resolveSourceID, registerSource, hasSourceRegistryEntry, } from './source_def_utils';
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.hasSourceRegistryEntry = exports.registerSource = exports.resolveSourceID = exports.mkTableSourceDef = exports.mkSQLSourceDef = exports.mkQuerySourceDef = exports.mkBuildID = exports.mkSourceID = exports.getCompiledSQL = exports.constantExprToSQL = exports.mkModelDef = exports.makeDigest = exports.composeSQLExpr = exports.indent = exports.getResultStructDefForView = exports.getResultStructDefForQuery = exports.QueryModel = exports.QueryQuery = exports.QueryStruct = exports.QueryField = void 0;
39
+ exports.hasSourceRegistryEntry = exports.registerSource = exports.resolveSourceID = exports.mkTableSourceDef = exports.mkSQLSourceDef = exports.mkQuerySourceDef = exports.mkBuildID = exports.mkSourceID = exports.getCompiledSQL = exports.constantExprToSQL = exports.pathToKey = exports.mkModelDef = exports.makeDigest = exports.composeSQLExpr = exports.indent = exports.getResultStructDefForView = exports.getResultStructDefForQuery = exports.QueryModel = exports.QueryQuery = exports.QueryStruct = exports.QueryField = void 0;
40
40
  __exportStar(require("./malloy_types"), exports);
41
41
  const query_node_1 = require("./query_node");
42
42
  Object.defineProperty(exports, "QueryField", { enumerable: true, get: function () { return query_node_1.QueryField; } });
@@ -60,6 +60,7 @@ Object.defineProperty(exports, "indent", { enumerable: true, get: function () {
60
60
  Object.defineProperty(exports, "composeSQLExpr", { enumerable: true, get: function () { return utils_1.composeSQLExpr; } });
61
61
  Object.defineProperty(exports, "makeDigest", { enumerable: true, get: function () { return utils_1.makeDigest; } });
62
62
  Object.defineProperty(exports, "mkModelDef", { enumerable: true, get: function () { return utils_1.mkModelDef; } });
63
+ Object.defineProperty(exports, "pathToKey", { enumerable: true, get: function () { return utils_1.pathToKey; } });
63
64
  var constant_expression_compiler_1 = require("./constant_expression_compiler");
64
65
  Object.defineProperty(exports, "constantExprToSQL", { enumerable: true, get: function () { return constant_expression_compiler_1.constantExprToSQL; } });
65
66
  var sql_compiled_1 = require("./sql_compiled");
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const MALLOY_VERSION = "0.0.374";
1
+ export declare const MALLOY_VERSION = "0.0.376";
package/dist/version.js CHANGED
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MALLOY_VERSION = void 0;
4
4
  // generated with 'generate-version-file' script; do not edit manually
5
- exports.MALLOY_VERSION = '0.0.374';
5
+ exports.MALLOY_VERSION = '0.0.376';
6
6
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.374",
3
+ "version": "0.0.376",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
7
+ "./internal": "./dist/internal.js",
7
8
  "./test": "./dist/test/index.js",
8
9
  "./test/matchers": "./dist/test/matchers.js",
9
10
  "./connection": "./dist/connection/index.js",
@@ -14,6 +15,9 @@
14
15
  "index": [
15
16
  "./dist/index.d.ts"
16
17
  ],
18
+ "internal": [
19
+ "./dist/internal.d.ts"
20
+ ],
17
21
  "test": [
18
22
  "./dist/test/index.d.ts"
19
23
  ],
@@ -47,9 +51,9 @@
47
51
  "generate-version-file": "VERSION=$(npm pkg get version --workspaces=false | tr -d \\\")\necho \"// generated with 'generate-version-file' script; do not edit manually\\nexport const MALLOY_VERSION = '$VERSION';\" > src/version.ts"
48
52
  },
49
53
  "dependencies": {
50
- "@malloydata/malloy-filter": "0.0.374",
51
- "@malloydata/malloy-interfaces": "0.0.374",
52
- "@malloydata/malloy-tag": "0.0.374",
54
+ "@malloydata/malloy-filter": "0.0.376",
55
+ "@malloydata/malloy-interfaces": "0.0.376",
56
+ "@malloydata/malloy-tag": "0.0.376",
53
57
  "@noble/hashes": "^1.8.0",
54
58
  "antlr4ts": "^0.5.0-alpha.4",
55
59
  "assert": "^2.0.0",