@malloydata/malloy-interfaces 0.0.294 → 0.0.296
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.js +1 -1
- package/dist/to_malloy.js +3 -3
- package/dist/types.d.ts +2 -2
- package/dist/types.js +4 -4
- package/package.json +1 -1
- package/thrift/malloy.thrift +2 -2
package/dist/index.js
CHANGED
package/dist/to_malloy.js
CHANGED
|
@@ -122,7 +122,7 @@ function serializeDateAsLiteral([year, month, day, hour, minute, second], granul
|
|
|
122
122
|
return `@${year}-${month}`;
|
|
123
123
|
}
|
|
124
124
|
case 'week': {
|
|
125
|
-
return
|
|
125
|
+
return `@${year}-${month}-${day}-WK`;
|
|
126
126
|
}
|
|
127
127
|
case 'day': {
|
|
128
128
|
return `@${year}-${month}-${day}`;
|
|
@@ -463,13 +463,13 @@ function filterToFragments(filter) {
|
|
|
463
463
|
switch (filter.kind) {
|
|
464
464
|
case 'filter_string':
|
|
465
465
|
return [
|
|
466
|
-
...
|
|
466
|
+
...expressionToFragments(filter.expression),
|
|
467
467
|
' ~ ',
|
|
468
468
|
quoteFilter(filter.filter),
|
|
469
469
|
];
|
|
470
470
|
case 'literal_equality':
|
|
471
471
|
return [
|
|
472
|
-
...
|
|
472
|
+
...expressionToFragments(filter.expression),
|
|
473
473
|
' = ',
|
|
474
474
|
...literalToFragments(filter.value),
|
|
475
475
|
];
|
package/dist/types.d.ts
CHANGED
|
@@ -242,7 +242,7 @@ export type FilterOperation = {
|
|
|
242
242
|
filter: Filter;
|
|
243
243
|
};
|
|
244
244
|
export type FilterStringApplication = {
|
|
245
|
-
|
|
245
|
+
expression: Expression;
|
|
246
246
|
filter: string;
|
|
247
247
|
};
|
|
248
248
|
export type FilterableTypeType = 'string_type' | 'boolean_type' | 'number_type' | 'date_type' | 'timestamp_type';
|
|
@@ -284,7 +284,7 @@ export type Limit = {
|
|
|
284
284
|
limit: number;
|
|
285
285
|
};
|
|
286
286
|
export type LiteralEqualityComparison = {
|
|
287
|
-
|
|
287
|
+
expression: Expression;
|
|
288
288
|
value: LiteralValue;
|
|
289
289
|
};
|
|
290
290
|
export type LiteralValueType = 'string_literal' | 'number_literal' | 'date_literal' | 'timestamp_literal' | 'boolean_literal' | 'null_literal' | 'filter_expression_literal';
|
package/dist/types.js
CHANGED
|
@@ -576,8 +576,8 @@ exports.MALLOY_INTERFACE_TYPES = {
|
|
|
576
576
|
'type': 'struct',
|
|
577
577
|
'name': 'FilterStringApplication',
|
|
578
578
|
'fields': {
|
|
579
|
-
'
|
|
580
|
-
'type': '
|
|
579
|
+
'expression': {
|
|
580
|
+
'type': 'Expression',
|
|
581
581
|
'optional': false,
|
|
582
582
|
'array': false,
|
|
583
583
|
},
|
|
@@ -688,8 +688,8 @@ exports.MALLOY_INTERFACE_TYPES = {
|
|
|
688
688
|
'type': 'struct',
|
|
689
689
|
'name': 'LiteralEqualityComparison',
|
|
690
690
|
'fields': {
|
|
691
|
-
'
|
|
692
|
-
'type': '
|
|
691
|
+
'expression': {
|
|
692
|
+
'type': 'Expression',
|
|
693
693
|
'optional': false,
|
|
694
694
|
'array': false,
|
|
695
695
|
},
|
package/package.json
CHANGED
package/thrift/malloy.thrift
CHANGED
|
@@ -316,12 +316,12 @@ union Filter {
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
struct FilterStringApplication {
|
|
319
|
-
1: required
|
|
319
|
+
1: required Expression expression,
|
|
320
320
|
2: required string filter,
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
struct LiteralEqualityComparison {
|
|
324
|
-
1: required
|
|
324
|
+
1: required Expression expression,
|
|
325
325
|
2: required LiteralValue value,
|
|
326
326
|
}
|
|
327
327
|
|