@malloydata/malloy 0.0.24-dev230216003028 → 0.0.24-dev230216173847

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.
@@ -1,10 +1,5 @@
1
1
  import { BinaryBoolean } from "./binary-boolean";
2
2
  export declare class ExprLogicalOp extends BinaryBoolean<"and" | "or"> {
3
3
  elementType: string;
4
- legalChildTypes: (import("../types/type-desc").TypeDesc | {
5
- aggregate: boolean;
6
- dataType: import("../types/type-desc").FieldValueType;
7
- expressionType: import("../../..").ExpressionType;
8
- rawType?: string | undefined;
9
- })[];
4
+ legalChildTypes: import("../types/type-desc").TypeDesc[];
10
5
  }
@@ -29,7 +29,7 @@ class ExprLogicalOp extends binary_boolean_1.BinaryBoolean {
29
29
  constructor() {
30
30
  super(...arguments);
31
31
  this.elementType = "logical operator";
32
- this.legalChildTypes = [fragtype_utils_1.FT.boolT, { ...fragtype_utils_1.FT.boolT, "aggregate": true }];
32
+ this.legalChildTypes = [fragtype_utils_1.FT.boolT, fragtype_utils_1.FT.aggregateBoolT];
33
33
  }
34
34
  }
35
35
  exports.ExprLogicalOp = ExprLogicalOp;
@@ -36,4 +36,5 @@ export declare class FT {
36
36
  static timestampT: TypeDesc;
37
37
  static boolT: TypeDesc;
38
38
  static anyAtomicT: TypeDesc[];
39
+ static aggregateBoolT: TypeDesc;
39
40
  }
@@ -23,8 +23,8 @@
23
23
  */
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.FT = void 0;
26
- function mkFragType(dType) {
27
- return { "dataType": dType, "expressionType": "scalar" };
26
+ function mkFragType(dataType, expressionType = "scalar") {
27
+ return { dataType, expressionType };
28
28
  }
29
29
  /**
30
30
  * Collects functions which operate on fragtype compatible objects
@@ -97,4 +97,5 @@ FT.anyAtomicT = [
97
97
  FT.timestampT,
98
98
  FT.boolT
99
99
  ];
100
+ FT.aggregateBoolT = mkFragType("boolean", "aggregate");
100
101
  //# sourceMappingURL=fragtype-utils.js.map
@@ -786,6 +786,8 @@ describe("qops", () => {
786
786
  `));
787
787
  test("where single", modelOK("query:a->{ group_by: astr; where: af > 10 }"));
788
788
  test("having single", modelOK("query:ab->{ aggregate: acount; group_by: astr; having: acount > 10 }"));
789
+ test("compound having still works", modelOK("query:ab->{ aggregate: acount; having: acount > 10 and acount < 100 }"));
790
+ test("compound aggregate still works", modelOK("query:ab->{ aggregate: thing is acount > 10 and acount < 100 }"));
789
791
  test("where multiple", modelOK("query:a->{ group_by: astr; where: af > 10,astr~'a%' }"));
790
792
  test(`filters preserve source formatting in code:`, () => {
791
793
  const model = new BetaModel(`source: notb is a + { where: astr != 'b' }`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.24-dev230216003028",
3
+ "version": "0.0.24-dev230216173847",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",