@malloydata/malloy 0.0.180-dev240904183715 → 0.0.180-dev240906180931

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.
@@ -25,7 +25,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.ExprNot = void 0;
26
26
  const fragtype_utils_1 = require("../fragtype-utils");
27
27
  const unary_1 = require("./unary");
28
- const utils_1 = require("./utils");
29
28
  class ExprNot extends unary_1.Unary {
30
29
  constructor(expr) {
31
30
  super(expr);
@@ -38,7 +37,7 @@ class ExprNot extends unary_1.Unary {
38
37
  return {
39
38
  ...notThis,
40
39
  dataType: 'boolean',
41
- value: doNot ? (0, utils_1.nullsafeNot)(notThis.value) : { node: 'false' },
40
+ value: { node: 'not', e: doNot ? notThis.value : { node: 'false' } },
42
41
  };
43
42
  }
44
43
  }
@@ -56,7 +56,6 @@ export * from './expressions/range';
56
56
  export * from './expressions/time-frame';
57
57
  export * from './expressions/top-by';
58
58
  export * from './expressions/unary';
59
- export * from './expressions/utils';
60
59
  export * from './statements/import-statement';
61
60
  export * from './query-properties/extend';
62
61
  export * from './parameters/argument';
@@ -94,7 +94,6 @@ __exportStar(require("./expressions/range"), exports);
94
94
  __exportStar(require("./expressions/time-frame"), exports);
95
95
  __exportStar(require("./expressions/top-by"), exports);
96
96
  __exportStar(require("./expressions/unary"), exports);
97
- __exportStar(require("./expressions/utils"), exports);
98
97
  __exportStar(require("./statements/import-statement"), exports);
99
98
  __exportStar(require("./query-properties/extend"), exports);
100
99
  __exportStar(require("./parameters/argument"), exports);
@@ -25,7 +25,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.applyBinary = exports.getMorphicValue = exports.ExprDuration = exports.ExpressionDef = void 0;
26
26
  const malloy_types_1 = require("../../../model/malloy_types");
27
27
  const ast_utils_1 = require("../ast-utils");
28
- const utils_1 = require("../expressions/utils");
29
28
  const fragtype_utils_1 = require("../fragtype-utils");
30
29
  const time_utils_1 = require("../time-utils");
31
30
  const granular_result_1 = require("./granular-result");
@@ -236,6 +235,7 @@ function nullCompare(left, op, right) {
236
235
  return undefined;
237
236
  }
238
237
  function equality(fs, left, op, right) {
238
+ var _a;
239
239
  const lhs = left.getExpression(fs);
240
240
  const rhs = right.getExpression(fs);
241
241
  const node = (0, binary_operators_1.getExprNode)(op);
@@ -269,19 +269,11 @@ function equality(fs, left, op, right) {
269
269
  }
270
270
  value = regexCmp;
271
271
  }
272
- value = (0, utils_1.nullsafeNot)(value, op);
273
272
  break;
274
273
  }
275
274
  case '=':
276
275
  case '!=': {
277
- const nullCmp = nullCompare(lhs, op, rhs);
278
- const eqNode = value;
279
- if (nullCmp) {
280
- value = nullCmp;
281
- }
282
- else {
283
- value = (0, utils_1.nullsafeNot)(regexEqual(lhs, rhs) || eqNode, op);
284
- }
276
+ value = (_a = nullCompare(lhs, op, rhs)) !== null && _a !== void 0 ? _a : value;
285
277
  break;
286
278
  }
287
279
  }
@@ -66,96 +66,97 @@ export declare class MalloyLexer extends Lexer {
66
66
  static readonly JSON = 61;
67
67
  static readonly LAST = 62;
68
68
  static readonly LEFT = 63;
69
- static readonly MAX = 64;
70
- static readonly MIN = 65;
71
- static readonly MINUTE = 66;
72
- static readonly MONTH = 67;
73
- static readonly NOT = 68;
74
- static readonly NOW = 69;
75
- static readonly NULL = 70;
76
- static readonly NUMBER = 71;
77
- static readonly ON = 72;
78
- static readonly OR = 73;
79
- static readonly PICK = 74;
80
- static readonly QUARTER = 75;
81
- static readonly RIGHT = 76;
82
- static readonly SECOND = 77;
83
- static readonly STRING = 78;
84
- static readonly SOURCE_KW = 79;
85
- static readonly SUM = 80;
86
- static readonly SQL = 81;
87
- static readonly TABLE = 82;
88
- static readonly THEN = 83;
89
- static readonly THIS = 84;
90
- static readonly TIMESTAMP = 85;
91
- static readonly TO = 86;
92
- static readonly TRUE = 87;
93
- static readonly TURTLE = 88;
94
- static readonly WEEK = 89;
95
- static readonly WHEN = 90;
96
- static readonly WITH = 91;
97
- static readonly YEAR = 92;
98
- static readonly UNGROUPED = 93;
99
- static readonly STRING_ESCAPE = 94;
100
- static readonly HACKY_REGEX = 95;
101
- static readonly SQ_STRING = 96;
102
- static readonly DQ_STRING = 97;
103
- static readonly BQ_STRING = 98;
104
- static readonly DOC_ANNOTATION = 99;
105
- static readonly ANNOTATION = 100;
106
- static readonly AMPER = 101;
107
- static readonly ARROW = 102;
108
- static readonly FAT_ARROW = 103;
109
- static readonly OPAREN = 104;
110
- static readonly CPAREN = 105;
111
- static readonly OBRACK = 106;
112
- static readonly CBRACK = 107;
113
- static readonly OCURLY = 108;
114
- static readonly CCURLY = 109;
115
- static readonly DOUBLECOLON = 110;
116
- static readonly TRIPLECOLON = 111;
117
- static readonly EXCLAM = 112;
118
- static readonly COLON = 113;
119
- static readonly COMMA = 114;
120
- static readonly DOT = 115;
121
- static readonly LT = 116;
122
- static readonly GT = 117;
123
- static readonly EQ = 118;
124
- static readonly NE = 119;
125
- static readonly LTE = 120;
126
- static readonly GTE = 121;
127
- static readonly PLUS = 122;
128
- static readonly MINUS = 123;
129
- static readonly STAR = 124;
130
- static readonly STARSTAR = 125;
131
- static readonly SLASH = 126;
132
- static readonly BAR = 127;
133
- static readonly SEMI = 128;
134
- static readonly NOT_MATCH = 129;
135
- static readonly MATCH = 130;
136
- static readonly PERCENT = 131;
137
- static readonly DOUBLE_QMARK = 132;
138
- static readonly QMARK = 133;
139
- static readonly LITERAL_TIMESTAMP = 134;
140
- static readonly LITERAL_HOUR = 135;
141
- static readonly LITERAL_DAY = 136;
142
- static readonly LITERAL_QUARTER = 137;
143
- static readonly LITERAL_MONTH = 138;
144
- static readonly LITERAL_WEEK = 139;
145
- static readonly LITERAL_YEAR = 140;
146
- static readonly IDENTIFIER = 141;
147
- static readonly PERCENT_LITERAL = 142;
148
- static readonly NUMERIC_LITERAL = 143;
149
- static readonly INTEGER_LITERAL = 144;
150
- static readonly BLOCK_COMMENT = 145;
151
- static readonly COMMENT_TO_EOL = 146;
152
- static readonly WHITE_SPACE = 147;
153
- static readonly SQL_BEGIN = 148;
154
- static readonly CLOSE_CODE = 149;
155
- static readonly UNWATED_CHARS_TRAILING_NUMBERS = 150;
156
- static readonly UNEXPECTED_CHAR = 151;
157
- static readonly OPEN_CODE = 152;
158
- static readonly SQL_END = 153;
69
+ static readonly LIKE = 64;
70
+ static readonly MAX = 65;
71
+ static readonly MIN = 66;
72
+ static readonly MINUTE = 67;
73
+ static readonly MONTH = 68;
74
+ static readonly NOT = 69;
75
+ static readonly NOW = 70;
76
+ static readonly NULL = 71;
77
+ static readonly NUMBER = 72;
78
+ static readonly ON = 73;
79
+ static readonly OR = 74;
80
+ static readonly PICK = 75;
81
+ static readonly QUARTER = 76;
82
+ static readonly RIGHT = 77;
83
+ static readonly SECOND = 78;
84
+ static readonly STRING = 79;
85
+ static readonly SOURCE_KW = 80;
86
+ static readonly SUM = 81;
87
+ static readonly SQL = 82;
88
+ static readonly TABLE = 83;
89
+ static readonly THEN = 84;
90
+ static readonly THIS = 85;
91
+ static readonly TIMESTAMP = 86;
92
+ static readonly TO = 87;
93
+ static readonly TRUE = 88;
94
+ static readonly TURTLE = 89;
95
+ static readonly WEEK = 90;
96
+ static readonly WHEN = 91;
97
+ static readonly WITH = 92;
98
+ static readonly YEAR = 93;
99
+ static readonly UNGROUPED = 94;
100
+ static readonly STRING_ESCAPE = 95;
101
+ static readonly HACKY_REGEX = 96;
102
+ static readonly SQ_STRING = 97;
103
+ static readonly DQ_STRING = 98;
104
+ static readonly BQ_STRING = 99;
105
+ static readonly DOC_ANNOTATION = 100;
106
+ static readonly ANNOTATION = 101;
107
+ static readonly AMPER = 102;
108
+ static readonly ARROW = 103;
109
+ static readonly FAT_ARROW = 104;
110
+ static readonly OPAREN = 105;
111
+ static readonly CPAREN = 106;
112
+ static readonly OBRACK = 107;
113
+ static readonly CBRACK = 108;
114
+ static readonly OCURLY = 109;
115
+ static readonly CCURLY = 110;
116
+ static readonly DOUBLECOLON = 111;
117
+ static readonly TRIPLECOLON = 112;
118
+ static readonly EXCLAM = 113;
119
+ static readonly COLON = 114;
120
+ static readonly COMMA = 115;
121
+ static readonly DOT = 116;
122
+ static readonly LT = 117;
123
+ static readonly GT = 118;
124
+ static readonly EQ = 119;
125
+ static readonly NE = 120;
126
+ static readonly LTE = 121;
127
+ static readonly GTE = 122;
128
+ static readonly PLUS = 123;
129
+ static readonly MINUS = 124;
130
+ static readonly STAR = 125;
131
+ static readonly STARSTAR = 126;
132
+ static readonly SLASH = 127;
133
+ static readonly BAR = 128;
134
+ static readonly SEMI = 129;
135
+ static readonly NOT_MATCH = 130;
136
+ static readonly MATCH = 131;
137
+ static readonly PERCENT = 132;
138
+ static readonly DOUBLE_QMARK = 133;
139
+ static readonly QMARK = 134;
140
+ static readonly LITERAL_TIMESTAMP = 135;
141
+ static readonly LITERAL_HOUR = 136;
142
+ static readonly LITERAL_DAY = 137;
143
+ static readonly LITERAL_QUARTER = 138;
144
+ static readonly LITERAL_MONTH = 139;
145
+ static readonly LITERAL_WEEK = 140;
146
+ static readonly LITERAL_YEAR = 141;
147
+ static readonly IDENTIFIER = 142;
148
+ static readonly PERCENT_LITERAL = 143;
149
+ static readonly NUMERIC_LITERAL = 144;
150
+ static readonly INTEGER_LITERAL = 145;
151
+ static readonly BLOCK_COMMENT = 146;
152
+ static readonly COMMENT_TO_EOL = 147;
153
+ static readonly WHITE_SPACE = 148;
154
+ static readonly SQL_BEGIN = 149;
155
+ static readonly CLOSE_CODE = 150;
156
+ static readonly UNWATED_CHARS_TRAILING_NUMBERS = 151;
157
+ static readonly UNEXPECTED_CHAR = 152;
158
+ static readonly OPEN_CODE = 153;
159
+ static readonly SQL_END = 154;
159
160
  static readonly SQL_MODE = 1;
160
161
  static readonly channelNames: string[];
161
162
  static readonly modeNames: string[];