@malloydata/malloy 0.0.97-dev231026184251 → 0.0.97
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/lang/ast/elements/pipeline-desc.d.ts +4 -4
- package/dist/lang/ast/elements/pipeline-desc.js +10 -54
- package/dist/lang/ast/elements/source-query-nodes.d.ts +2 -2
- package/dist/lang/ast/elements/source-query-nodes.js +7 -26
- package/dist/lang/ast/query-elements/existing-query.js +2 -1
- package/dist/lang/ast/query-elements/full-query.js +16 -3
- package/dist/lang/ast/query-items/field-references.js +1 -3
- package/dist/lang/ast/query-properties/nest.js +11 -4
- package/dist/lang/ast/query-properties/refinements.d.ts +25 -0
- package/dist/lang/ast/query-properties/refinements.js +186 -0
- package/dist/lang/ast/struct-utils.d.ts +1 -0
- package/dist/lang/ast/struct-utils.js +8 -1
- package/dist/lang/ast/types/malloy-element.d.ts +1 -1
- package/dist/lang/ast/types/malloy-element.js +4 -2
- package/dist/lang/lib/Malloy/MalloyParser.d.ts +125 -111
- package/dist/lang/lib/Malloy/MalloyParser.js +1796 -1656
- package/dist/lang/lib/Malloy/MalloyParserListener.d.ts +11 -0
- package/dist/lang/lib/Malloy/MalloyParserVisitor.d.ts +7 -0
- package/dist/lang/malloy-to-ast.d.ts +1 -1
- package/dist/lang/malloy-to-ast.js +24 -16
- package/dist/lang/test/lenses.spec.d.ts +1 -0
- package/dist/lang/test/lenses.spec.js +130 -0
- package/package.json +1 -1
|
@@ -183,113 +183,114 @@ export declare class MalloyParser extends Parser {
|
|
|
183
183
|
static readonly RULE_topLevelQueryDefs = 20;
|
|
184
184
|
static readonly RULE_topLevelQueryDef = 21;
|
|
185
185
|
static readonly RULE_refineOperator = 22;
|
|
186
|
-
static readonly
|
|
187
|
-
static readonly
|
|
188
|
-
static readonly
|
|
189
|
-
static readonly
|
|
190
|
-
static readonly
|
|
191
|
-
static readonly
|
|
192
|
-
static readonly
|
|
193
|
-
static readonly
|
|
194
|
-
static readonly
|
|
195
|
-
static readonly
|
|
196
|
-
static readonly
|
|
197
|
-
static readonly
|
|
198
|
-
static readonly
|
|
199
|
-
static readonly
|
|
200
|
-
static readonly
|
|
201
|
-
static readonly
|
|
202
|
-
static readonly
|
|
203
|
-
static readonly
|
|
204
|
-
static readonly
|
|
205
|
-
static readonly
|
|
206
|
-
static readonly
|
|
207
|
-
static readonly
|
|
208
|
-
static readonly
|
|
209
|
-
static readonly
|
|
210
|
-
static readonly
|
|
211
|
-
static readonly
|
|
212
|
-
static readonly
|
|
213
|
-
static readonly
|
|
214
|
-
static readonly
|
|
215
|
-
static readonly
|
|
216
|
-
static readonly
|
|
217
|
-
static readonly
|
|
218
|
-
static readonly
|
|
219
|
-
static readonly
|
|
220
|
-
static readonly
|
|
221
|
-
static readonly
|
|
222
|
-
static readonly
|
|
223
|
-
static readonly
|
|
224
|
-
static readonly
|
|
225
|
-
static readonly
|
|
226
|
-
static readonly
|
|
227
|
-
static readonly
|
|
228
|
-
static readonly
|
|
229
|
-
static readonly
|
|
230
|
-
static readonly
|
|
231
|
-
static readonly
|
|
232
|
-
static readonly
|
|
233
|
-
static readonly
|
|
234
|
-
static readonly
|
|
235
|
-
static readonly
|
|
236
|
-
static readonly
|
|
237
|
-
static readonly
|
|
238
|
-
static readonly
|
|
239
|
-
static readonly
|
|
240
|
-
static readonly
|
|
241
|
-
static readonly
|
|
242
|
-
static readonly
|
|
243
|
-
static readonly
|
|
244
|
-
static readonly
|
|
245
|
-
static readonly
|
|
246
|
-
static readonly
|
|
247
|
-
static readonly
|
|
248
|
-
static readonly
|
|
249
|
-
static readonly
|
|
250
|
-
static readonly
|
|
251
|
-
static readonly
|
|
252
|
-
static readonly
|
|
253
|
-
static readonly
|
|
254
|
-
static readonly
|
|
255
|
-
static readonly
|
|
256
|
-
static readonly
|
|
257
|
-
static readonly
|
|
258
|
-
static readonly
|
|
259
|
-
static readonly
|
|
260
|
-
static readonly
|
|
261
|
-
static readonly
|
|
262
|
-
static readonly
|
|
263
|
-
static readonly
|
|
264
|
-
static readonly
|
|
265
|
-
static readonly
|
|
266
|
-
static readonly
|
|
267
|
-
static readonly
|
|
268
|
-
static readonly
|
|
269
|
-
static readonly
|
|
270
|
-
static readonly
|
|
271
|
-
static readonly
|
|
272
|
-
static readonly
|
|
273
|
-
static readonly
|
|
274
|
-
static readonly
|
|
275
|
-
static readonly
|
|
276
|
-
static readonly
|
|
277
|
-
static readonly
|
|
278
|
-
static readonly
|
|
279
|
-
static readonly
|
|
280
|
-
static readonly
|
|
281
|
-
static readonly
|
|
282
|
-
static readonly
|
|
283
|
-
static readonly
|
|
284
|
-
static readonly
|
|
285
|
-
static readonly
|
|
286
|
-
static readonly
|
|
287
|
-
static readonly
|
|
288
|
-
static readonly
|
|
289
|
-
static readonly
|
|
290
|
-
static readonly
|
|
291
|
-
static readonly
|
|
292
|
-
static readonly
|
|
186
|
+
static readonly RULE_turtleName = 23;
|
|
187
|
+
static readonly RULE_queryRefinement = 24;
|
|
188
|
+
static readonly RULE_sourceExtension = 25;
|
|
189
|
+
static readonly RULE_sqlSource = 26;
|
|
190
|
+
static readonly RULE_pipelineFromName = 27;
|
|
191
|
+
static readonly RULE_firstSegment = 28;
|
|
192
|
+
static readonly RULE_pipeElement = 29;
|
|
193
|
+
static readonly RULE_exploreTable = 30;
|
|
194
|
+
static readonly RULE_connectionId = 31;
|
|
195
|
+
static readonly RULE_queryProperties = 32;
|
|
196
|
+
static readonly RULE_filterShortcut = 33;
|
|
197
|
+
static readonly RULE_exploreQueryName = 34;
|
|
198
|
+
static readonly RULE_queryName = 35;
|
|
199
|
+
static readonly RULE_sourcePropertyList = 36;
|
|
200
|
+
static readonly RULE_sourceDefinition = 37;
|
|
201
|
+
static readonly RULE_sqExplore = 38;
|
|
202
|
+
static readonly RULE_sourceNameDef = 39;
|
|
203
|
+
static readonly RULE_sourceID = 40;
|
|
204
|
+
static readonly RULE_exploreProperties = 41;
|
|
205
|
+
static readonly RULE_exploreStatement = 42;
|
|
206
|
+
static readonly RULE_defMeasures = 43;
|
|
207
|
+
static readonly RULE_defDimensions = 44;
|
|
208
|
+
static readonly RULE_renameList = 45;
|
|
209
|
+
static readonly RULE_exploreRenameDef = 46;
|
|
210
|
+
static readonly RULE_defList = 47;
|
|
211
|
+
static readonly RULE_fieldDef = 48;
|
|
212
|
+
static readonly RULE_fieldNameDef = 49;
|
|
213
|
+
static readonly RULE_joinNameDef = 50;
|
|
214
|
+
static readonly RULE_declareStatement = 51;
|
|
215
|
+
static readonly RULE_joinStatement = 52;
|
|
216
|
+
static readonly RULE_queryExtend = 53;
|
|
217
|
+
static readonly RULE_ambiguousModification = 54;
|
|
218
|
+
static readonly RULE_modEither = 55;
|
|
219
|
+
static readonly RULE_sqExpr = 56;
|
|
220
|
+
static readonly RULE_leadSeg = 57;
|
|
221
|
+
static readonly RULE_qSeg = 58;
|
|
222
|
+
static readonly RULE_queryExtendStatement = 59;
|
|
223
|
+
static readonly RULE_queryExtendStatementList = 60;
|
|
224
|
+
static readonly RULE_joinList = 61;
|
|
225
|
+
static readonly RULE_isExplore = 62;
|
|
226
|
+
static readonly RULE_joinDef = 63;
|
|
227
|
+
static readonly RULE_joinExpression = 64;
|
|
228
|
+
static readonly RULE_filterStatement = 65;
|
|
229
|
+
static readonly RULE_filteredBy = 66;
|
|
230
|
+
static readonly RULE_filterClauseList = 67;
|
|
231
|
+
static readonly RULE_whereStatement = 68;
|
|
232
|
+
static readonly RULE_havingStatement = 69;
|
|
233
|
+
static readonly RULE_subQueryDefList = 70;
|
|
234
|
+
static readonly RULE_exploreQueryNameDef = 71;
|
|
235
|
+
static readonly RULE_exploreQueryDef = 72;
|
|
236
|
+
static readonly RULE_queryStatement = 73;
|
|
237
|
+
static readonly RULE_queryJoinStatement = 74;
|
|
238
|
+
static readonly RULE_groupByStatement = 75;
|
|
239
|
+
static readonly RULE_queryFieldList = 76;
|
|
240
|
+
static readonly RULE_queryFieldEntry = 77;
|
|
241
|
+
static readonly RULE_nestStatement = 78;
|
|
242
|
+
static readonly RULE_nestedQueryList = 79;
|
|
243
|
+
static readonly RULE_nestEntry = 80;
|
|
244
|
+
static readonly RULE_aggregateStatement = 81;
|
|
245
|
+
static readonly RULE_calculateStatement = 82;
|
|
246
|
+
static readonly RULE_projectStatement = 83;
|
|
247
|
+
static readonly RULE_orderByStatement = 84;
|
|
248
|
+
static readonly RULE_ordering = 85;
|
|
249
|
+
static readonly RULE_orderBySpec = 86;
|
|
250
|
+
static readonly RULE_limitStatement = 87;
|
|
251
|
+
static readonly RULE_bySpec = 88;
|
|
252
|
+
static readonly RULE_topStatement = 89;
|
|
253
|
+
static readonly RULE_indexElement = 90;
|
|
254
|
+
static readonly RULE_indexFields = 91;
|
|
255
|
+
static readonly RULE_indexStatement = 92;
|
|
256
|
+
static readonly RULE_sampleStatement = 93;
|
|
257
|
+
static readonly RULE_timezoneStatement = 94;
|
|
258
|
+
static readonly RULE_queryAnnotation = 95;
|
|
259
|
+
static readonly RULE_sampleSpec = 96;
|
|
260
|
+
static readonly RULE_aggregate = 97;
|
|
261
|
+
static readonly RULE_malloyType = 98;
|
|
262
|
+
static readonly RULE_compareOp = 99;
|
|
263
|
+
static readonly RULE_string = 100;
|
|
264
|
+
static readonly RULE_shortString = 101;
|
|
265
|
+
static readonly RULE_numericLiteral = 102;
|
|
266
|
+
static readonly RULE_literal = 103;
|
|
267
|
+
static readonly RULE_dateLiteral = 104;
|
|
268
|
+
static readonly RULE_tablePath = 105;
|
|
269
|
+
static readonly RULE_tableURI = 106;
|
|
270
|
+
static readonly RULE_id = 107;
|
|
271
|
+
static readonly RULE_timeframe = 108;
|
|
272
|
+
static readonly RULE_ungroup = 109;
|
|
273
|
+
static readonly RULE_malloyOrSQLType = 110;
|
|
274
|
+
static readonly RULE_fieldExpr = 111;
|
|
275
|
+
static readonly RULE_partialAllowedFieldExpr = 112;
|
|
276
|
+
static readonly RULE_pickStatement = 113;
|
|
277
|
+
static readonly RULE_pick = 114;
|
|
278
|
+
static readonly RULE_argumentList = 115;
|
|
279
|
+
static readonly RULE_fieldNameList = 116;
|
|
280
|
+
static readonly RULE_fieldCollection = 117;
|
|
281
|
+
static readonly RULE_collectionWildCard = 118;
|
|
282
|
+
static readonly RULE_starQualified = 119;
|
|
283
|
+
static readonly RULE_taggedRef = 120;
|
|
284
|
+
static readonly RULE_refExpr = 121;
|
|
285
|
+
static readonly RULE_collectionMember = 122;
|
|
286
|
+
static readonly RULE_fieldPath = 123;
|
|
287
|
+
static readonly RULE_joinName = 124;
|
|
288
|
+
static readonly RULE_fieldName = 125;
|
|
289
|
+
static readonly RULE_justExpr = 126;
|
|
290
|
+
static readonly RULE_sqlExploreNameRef = 127;
|
|
291
|
+
static readonly RULE_nameSQLBlock = 128;
|
|
292
|
+
static readonly RULE_connectionName = 129;
|
|
293
|
+
static readonly RULE_experimentalStatementForTesting = 130;
|
|
293
294
|
static readonly ruleNames: string[];
|
|
294
295
|
private static readonly _LITERAL_NAMES;
|
|
295
296
|
private static readonly _SYMBOLIC_NAMES;
|
|
@@ -323,6 +324,7 @@ export declare class MalloyParser extends Parser {
|
|
|
323
324
|
topLevelQueryDefs(): TopLevelQueryDefsContext;
|
|
324
325
|
topLevelQueryDef(): TopLevelQueryDefContext;
|
|
325
326
|
refineOperator(): RefineOperatorContext;
|
|
327
|
+
turtleName(): TurtleNameContext;
|
|
326
328
|
queryRefinement(): QueryRefinementContext;
|
|
327
329
|
sourceExtension(): SourceExtensionContext;
|
|
328
330
|
sqlSource(): SqlSourceContext;
|
|
@@ -697,10 +699,19 @@ export declare class RefineOperatorContext extends ParserRuleContext {
|
|
|
697
699
|
exitRule(listener: MalloyParserListener): void;
|
|
698
700
|
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
699
701
|
}
|
|
702
|
+
export declare class TurtleNameContext extends ParserRuleContext {
|
|
703
|
+
id(): IdContext;
|
|
704
|
+
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
705
|
+
get ruleIndex(): number;
|
|
706
|
+
enterRule(listener: MalloyParserListener): void;
|
|
707
|
+
exitRule(listener: MalloyParserListener): void;
|
|
708
|
+
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
709
|
+
}
|
|
700
710
|
export declare class QueryRefinementContext extends ParserRuleContext {
|
|
701
|
-
queryProperties(): QueryPropertiesContext;
|
|
711
|
+
queryProperties(): QueryPropertiesContext | undefined;
|
|
702
712
|
REFINE(): TerminalNode | undefined;
|
|
703
713
|
refineOperator(): RefineOperatorContext | undefined;
|
|
714
|
+
turtleName(): TurtleNameContext | undefined;
|
|
704
715
|
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
705
716
|
get ruleIndex(): number;
|
|
706
717
|
enterRule(listener: MalloyParserListener): void;
|
|
@@ -744,8 +755,9 @@ export declare class PipelineFromNameContext extends ParserRuleContext {
|
|
|
744
755
|
export declare class FirstSegmentContext extends ParserRuleContext {
|
|
745
756
|
queryProperties(): QueryPropertiesContext | undefined;
|
|
746
757
|
ARROW(): TerminalNode | undefined;
|
|
758
|
+
queryRefinement(): QueryRefinementContext[];
|
|
759
|
+
queryRefinement(i: number): QueryRefinementContext;
|
|
747
760
|
exploreQueryName(): ExploreQueryNameContext | undefined;
|
|
748
|
-
queryRefinement(): QueryRefinementContext | undefined;
|
|
749
761
|
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
750
762
|
get ruleIndex(): number;
|
|
751
763
|
enterRule(listener: MalloyParserListener): void;
|
|
@@ -1234,7 +1246,8 @@ export declare class SQSQLContext extends SqExprContext {
|
|
|
1234
1246
|
}
|
|
1235
1247
|
export declare class LeadSegContext extends ParserRuleContext {
|
|
1236
1248
|
id(): IdContext | undefined;
|
|
1237
|
-
queryRefinement(): QueryRefinementContext
|
|
1249
|
+
queryRefinement(): QueryRefinementContext[];
|
|
1250
|
+
queryRefinement(i: number): QueryRefinementContext;
|
|
1238
1251
|
queryProperties(): QueryPropertiesContext | undefined;
|
|
1239
1252
|
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
1240
1253
|
get ruleIndex(): number;
|
|
@@ -1516,7 +1529,8 @@ export declare class NestEntryContext extends ParserRuleContext {
|
|
|
1516
1529
|
export declare class NestExistingContext extends NestEntryContext {
|
|
1517
1530
|
tags(): TagsContext;
|
|
1518
1531
|
queryName(): QueryNameContext;
|
|
1519
|
-
queryRefinement(): QueryRefinementContext
|
|
1532
|
+
queryRefinement(): QueryRefinementContext[];
|
|
1533
|
+
queryRefinement(i: number): QueryRefinementContext;
|
|
1520
1534
|
constructor(ctx: NestEntryContext);
|
|
1521
1535
|
enterRule(listener: MalloyParserListener): void;
|
|
1522
1536
|
exitRule(listener: MalloyParserListener): void;
|