@malloydata/malloy 0.0.24-dev230216003028 → 0.0.24-dev230217165618
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/expressions/constant-sub-expression.js +1 -1
- package/dist/lang/ast/expressions/expr-asymmetric.js +22 -0
- package/dist/lang/ast/expressions/expr-cast.js +2 -2
- package/dist/lang/ast/expressions/expr-count.d.ts +1 -1
- package/dist/lang/ast/expressions/expr-count.js +1 -1
- package/dist/lang/ast/expressions/expr-filter.js +2 -2
- package/dist/lang/ast/expressions/expr-granular-time.d.ts +1 -1
- package/dist/lang/ast/expressions/expr-granular-time.js +3 -3
- package/dist/lang/ast/expressions/expr-logical-op.d.ts +1 -6
- package/dist/lang/ast/expressions/expr-logical-op.js +1 -1
- package/dist/lang/ast/expressions/expr-max.js +22 -0
- package/dist/lang/ast/expressions/expr-min.js +22 -0
- package/dist/lang/ast/expressions/expr-mul-div.js +2 -2
- package/dist/lang/ast/expressions/expr-sum.js +22 -0
- package/dist/lang/ast/expressions/expr-time-extract.js +2 -2
- package/dist/lang/ast/expressions/expr-ungroup.js +2 -2
- package/dist/lang/ast/expressions/granular-literal.js +2 -2
- package/dist/lang/ast/expressions/partial-compare.js +2 -2
- package/dist/lang/ast/expressions/time-frame.js +2 -2
- package/dist/lang/ast/expressions/top-by.js +2 -2
- package/dist/lang/ast/fragtype-utils.d.ts +1 -0
- package/dist/lang/ast/fragtype-utils.js +3 -2
- package/dist/lang/ast/parameters/constant-parameter.js +1 -1
- package/dist/lang/ast/sources/named-source.js +3 -3
- package/dist/lang/ast/types/expression-def.js +2 -2
- package/dist/lang/ast/types/field-collection-member.js +2 -2
- package/dist/lang/ast/types/granular-result.js +22 -0
- package/dist/lang/ast/types/malloy-element.d.ts +1 -1
- package/dist/lang/ast/types/malloy-element.js +1 -1
- package/dist/lang/test/parse.spec.js +2 -0
- package/package.json +1 -1
|
@@ -66,7 +66,7 @@ class DollarReference extends expression_def_1.ExpressionDef {
|
|
|
66
66
|
}
|
|
67
67
|
class ConstantSubExpression extends expression_def_1.ExpressionDef {
|
|
68
68
|
constructor(expr) {
|
|
69
|
-
super({ expr });
|
|
69
|
+
super({ "expr": expr });
|
|
70
70
|
this.expr = expr;
|
|
71
71
|
this.elementType = "constantExpression";
|
|
72
72
|
}
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
* a copy of this software and associated documentation files
|
|
7
|
+
* (the "Software"), to deal in the Software without restriction,
|
|
8
|
+
* including without limitation the rights to use, copy, modify, merge,
|
|
9
|
+
* publish, distribute, sublicense, and/or sell copies of the Software,
|
|
10
|
+
* and to permit persons to whom the Software is furnished to do so,
|
|
11
|
+
* subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be
|
|
14
|
+
* included in all copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
*/
|
|
2
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
25
|
exports.ExprAsymmetric = void 0;
|
|
4
26
|
const expr_aggregate_function_1 = require("./expr-aggregate-function");
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExprCast = exports.isCastType = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.ExprCast = exports.isCastType = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ExprCast = exports.isCastType = void 0;
|
|
26
26
|
const time_utils_1 = require("../time-utils");
|
|
27
27
|
const expression_def_1 = require("../types/expression-def");
|
|
28
28
|
const utils_1 = require("./utils");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExprValue } from "../types/expr-value";
|
|
2
1
|
import { FieldReference } from "../query-items/field-references";
|
|
2
|
+
import { ExprValue } from "../types/expr-value";
|
|
3
3
|
import { FieldSpace } from "../types/field-space";
|
|
4
4
|
import { ExprAggregateFunction } from "./expr-aggregate-function";
|
|
5
5
|
export declare class ExprCount extends ExprAggregateFunction {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExprFilter = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.ExprFilter = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ExprFilter = void 0;
|
|
26
26
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
27
27
|
const ast_utils_1 = require("../ast-utils");
|
|
28
28
|
const fragtype_utils_1 = require("../fragtype-utils");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TimestampUnit } from "../../../model/malloy_types";
|
|
2
|
-
import { FieldSpace } from "../types/field-space";
|
|
3
2
|
import { ExprValue } from "../types/expr-value";
|
|
4
3
|
import { ExpressionDef } from "../types/expression-def";
|
|
4
|
+
import { FieldSpace } from "../types/field-space";
|
|
5
5
|
/**
|
|
6
6
|
* GranularTime is a moment in time which ALSO has a "granularity"
|
|
7
7
|
* commonly this are created by applying ".datePart" to an expression
|
|
@@ -25,11 +25,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
exports.ExprGranularTime = void 0;
|
|
26
26
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
27
27
|
const ast_utils_1 = require("../ast-utils");
|
|
28
|
-
const expr_time_1 = require("./expr-time");
|
|
29
28
|
const fragtype_utils_1 = require("../fragtype-utils");
|
|
30
|
-
const range_1 = require("./range");
|
|
31
29
|
const time_utils_1 = require("../time-utils");
|
|
32
30
|
const expression_def_1 = require("../types/expression-def");
|
|
31
|
+
const expr_time_1 = require("./expr-time");
|
|
32
|
+
const range_1 = require("./range");
|
|
33
33
|
/**
|
|
34
34
|
* GranularTime is a moment in time which ALSO has a "granularity"
|
|
35
35
|
* commonly this are created by applying ".datePart" to an expression
|
|
@@ -39,7 +39,7 @@ const expression_def_1 = require("../types/expression-def");
|
|
|
39
39
|
*/
|
|
40
40
|
class ExprGranularTime extends expression_def_1.ExpressionDef {
|
|
41
41
|
constructor(expr, units, truncate) {
|
|
42
|
-
super({ expr });
|
|
42
|
+
super({ "expr": expr });
|
|
43
43
|
this.expr = expr;
|
|
44
44
|
this.units = units;
|
|
45
45
|
this.truncate = truncate;
|
|
@@ -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:
|
|
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,
|
|
32
|
+
this.legalChildTypes = [fragtype_utils_1.FT.boolT, fragtype_utils_1.FT.aggregateBoolT];
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
exports.ExprLogicalOp = ExprLogicalOp;
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
* a copy of this software and associated documentation files
|
|
7
|
+
* (the "Software"), to deal in the Software without restriction,
|
|
8
|
+
* including without limitation the rights to use, copy, modify, merge,
|
|
9
|
+
* publish, distribute, sublicense, and/or sell copies of the Software,
|
|
10
|
+
* and to permit persons to whom the Software is furnished to do so,
|
|
11
|
+
* subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be
|
|
14
|
+
* included in all copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
*/
|
|
2
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
25
|
exports.ExprMax = void 0;
|
|
4
26
|
const fragtype_utils_1 = require("../fragtype-utils");
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
* a copy of this software and associated documentation files
|
|
7
|
+
* (the "Software"), to deal in the Software without restriction,
|
|
8
|
+
* including without limitation the rights to use, copy, modify, merge,
|
|
9
|
+
* publish, distribute, sublicense, and/or sell copies of the Software,
|
|
10
|
+
* and to permit persons to whom the Software is furnished to do so,
|
|
11
|
+
* subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be
|
|
14
|
+
* included in all copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
*/
|
|
2
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
25
|
exports.ExprMin = void 0;
|
|
4
26
|
const fragtype_utils_1 = require("../fragtype-utils");
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExprMulDiv = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.ExprMulDiv = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ExprMulDiv = void 0;
|
|
26
26
|
const binary_numeric_1 = require("./binary-numeric");
|
|
27
27
|
class ExprMulDiv extends binary_numeric_1.BinaryNumeric {
|
|
28
28
|
constructor() {
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
* a copy of this software and associated documentation files
|
|
7
|
+
* (the "Software"), to deal in the Software without restriction,
|
|
8
|
+
* including without limitation the rights to use, copy, modify, merge,
|
|
9
|
+
* publish, distribute, sublicense, and/or sell copies of the Software,
|
|
10
|
+
* and to permit persons to whom the Software is furnished to do so,
|
|
11
|
+
* subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be
|
|
14
|
+
* included in all copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
*/
|
|
2
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
25
|
exports.ExprSum = void 0;
|
|
4
26
|
const expr_asymmetric_1 = require("./expr-asymmetric");
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExprTimeExtract = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.ExprTimeExtract = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ExprTimeExtract = void 0;
|
|
26
26
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
27
27
|
const ast_utils_1 = require("../ast-utils");
|
|
28
28
|
const expression_def_1 = require("../types/expression-def");
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExprUngroup = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.ExprUngroup = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ExprUngroup = void 0;
|
|
26
26
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
27
27
|
const ast_utils_1 = require("../ast-utils");
|
|
28
28
|
const query_spaces_1 = require("../field-space/query-spaces");
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GranularLiteral = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.GranularLiteral = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.GranularLiteral = void 0;
|
|
26
26
|
const luxon_1 = require("luxon");
|
|
27
27
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
28
28
|
const range_1 = require("./range");
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PartialCompare = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.PartialCompare = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.PartialCompare = void 0;
|
|
26
26
|
const ast_utils_1 = require("../ast-utils");
|
|
27
27
|
const expression_def_1 = require("../types/expression-def");
|
|
28
28
|
class PartialCompare extends expression_def_1.ExpressionDef {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Timeframe = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.Timeframe = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.Timeframe = void 0;
|
|
26
26
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
27
27
|
const malloy_element_1 = require("../types/malloy-element");
|
|
28
28
|
class Timeframe extends malloy_element_1.MalloyElement {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TopBy = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.TopBy = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.TopBy = void 0;
|
|
26
26
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
27
27
|
const expression_def_1 = require("../types/expression-def");
|
|
28
28
|
const malloy_element_1 = require("../types/malloy-element");
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
*/
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.FT = void 0;
|
|
26
|
-
function mkFragType(
|
|
27
|
-
return {
|
|
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
|
|
@@ -29,7 +29,7 @@ class ConstantParameter extends has_parameter_1.HasParameter {
|
|
|
29
29
|
constructor(name, value) {
|
|
30
30
|
super({ name, "isCondition": false });
|
|
31
31
|
this.value = value;
|
|
32
|
-
this.has({ value });
|
|
32
|
+
this.has({ "value": value });
|
|
33
33
|
}
|
|
34
34
|
parameter() {
|
|
35
35
|
const cVal = this.value.constantValue();
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NamedSource = exports.IsValueBlock = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.NamedSource = exports.IsValueBlock = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.NamedSource = exports.IsValueBlock = void 0;
|
|
26
26
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
27
27
|
const source_1 = require("../elements/source");
|
|
28
28
|
const error_factory_1 = require("../error-factory");
|
|
@@ -106,7 +106,7 @@ class NamedSource extends source_1.Source {
|
|
|
106
106
|
notFound.dialect = notFound.dialect + err;
|
|
107
107
|
return notFound;
|
|
108
108
|
}
|
|
109
|
-
const declared = { ...ret.parameters }
|
|
109
|
+
const declared = { ...ret.parameters };
|
|
110
110
|
const makeWith = ((_a = this.isBlock) === null || _a === void 0 ? void 0 : _a.isMap) || {};
|
|
111
111
|
for (const [pName, pExpr] of Object.entries(makeWith)) {
|
|
112
112
|
const decl = declared[pName];
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applyBinary = exports.ExprDuration = exports.ExpressionDef = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.applyBinary = exports.ExprDuration = exports.ExpressionDef = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.applyBinary = 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
28
|
const utils_1 = require("../expressions/utils");
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFieldCollectionMember = void 0;
|
|
4
2
|
/*
|
|
5
3
|
* Copyright 2023 Google LLC
|
|
6
4
|
*
|
|
@@ -23,6 +21,8 @@ exports.isFieldCollectionMember = void 0;
|
|
|
23
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
23
|
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.isFieldCollectionMember = void 0;
|
|
26
26
|
const field_declaration_1 = require("../query-items/field-declaration");
|
|
27
27
|
const field_references_1 = require("../query-items/field-references");
|
|
28
28
|
function isFieldCollectionMember(el) {
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
* a copy of this software and associated documentation files
|
|
7
|
+
* (the "Software"), to deal in the Software without restriction,
|
|
8
|
+
* including without limitation the rights to use, copy, modify, merge,
|
|
9
|
+
* publish, distribute, sublicense, and/or sell copies of the Software,
|
|
10
|
+
* and to permit persons to whom the Software is furnished to do so,
|
|
11
|
+
* subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be
|
|
14
|
+
* included in all copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
*/
|
|
2
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
25
|
exports.isGranularResult = void 0;
|
|
4
26
|
function isGranularResult(v) {
|
|
@@ -62,8 +62,8 @@ export interface DocStatement extends MalloyElement {
|
|
|
62
62
|
}
|
|
63
63
|
export declare function isDocStatement(e: MalloyElement): e is DocStatement;
|
|
64
64
|
export declare class ListOf<ET extends MalloyElement> extends MalloyElement {
|
|
65
|
-
elementType: string;
|
|
66
65
|
protected elements: ET[];
|
|
66
|
+
elementType: string;
|
|
67
67
|
constructor(listDesc: string, elements: ET[]);
|
|
68
68
|
private newContents;
|
|
69
69
|
get list(): ET[];
|
|
@@ -263,8 +263,8 @@ exports.isDocStatement = isDocStatement;
|
|
|
263
263
|
class ListOf extends MalloyElement {
|
|
264
264
|
constructor(listDesc, elements) {
|
|
265
265
|
super();
|
|
266
|
-
this.elementType = "genericElementList";
|
|
267
266
|
this.elements = elements;
|
|
267
|
+
this.elementType = "genericElementList";
|
|
268
268
|
if (this.elementType === "genericElementList") {
|
|
269
269
|
this.elementType = listDesc;
|
|
270
270
|
}
|
|
@@ -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' }`);
|