@malloydata/malloy 0.0.403 → 0.0.405
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/LICENSE +77 -0
- package/dist/api/asynchronous.js +2 -4
- package/dist/api/connection.js +2 -4
- package/dist/api/core.js +5 -6
- package/dist/api/foundation/annotation.js +3 -11
- package/dist/api/foundation/compile.js +15 -8
- package/dist/api/foundation/core.d.ts +44 -6
- package/dist/api/foundation/core.js +112 -37
- package/dist/api/foundation/result.js +1 -2
- package/dist/api/foundation/runtime.js +9 -19
- package/dist/api/foundation/taggable.d.ts +5 -0
- package/dist/api/foundation/types.d.ts +15 -0
- package/dist/api/index.js +4 -6
- package/dist/api/sessioned.js +2 -4
- package/dist/api/stateless.js +2 -4
- package/dist/api/util.js +2 -4
- package/dist/connection/base_connection.js +2 -4
- package/dist/connection/types.d.ts +1 -3
- package/dist/connection_utils.js +2 -20
- package/dist/dialect/dialect.d.ts +9 -4
- package/dist/dialect/dialect.js +37 -31
- package/dist/dialect/dialect_map.js +2 -20
- package/dist/dialect/duckdb/dialect_functions.js +2 -4
- package/dist/dialect/duckdb/duckdb.js +2 -20
- package/dist/dialect/duckdb/function_overrides.js +2 -4
- package/dist/dialect/duckdb/index.js +2 -20
- package/dist/dialect/duckdb/table-path-parser.js +4 -4
- package/dist/dialect/functions/index.js +2 -20
- package/dist/dialect/functions/malloy_standard_functions.js +2 -4
- package/dist/dialect/functions/util.js +2 -21
- package/dist/dialect/index.js +2 -20
- package/dist/dialect/mysql/dialect_functions.js +2 -4
- package/dist/dialect/mysql/function_overrides.js +2 -4
- package/dist/dialect/mysql/index.js +2 -4
- package/dist/dialect/mysql/mysql.js +2 -20
- package/dist/dialect/pg_impl.d.ts +1 -0
- package/dist/dialect/pg_impl.js +10 -4
- package/dist/dialect/postgres/dialect_functions.js +2 -4
- package/dist/dialect/postgres/function_overrides.js +2 -4
- package/dist/dialect/postgres/index.js +2 -20
- package/dist/dialect/postgres/postgres.js +2 -20
- package/dist/dialect/snowflake/dialect_functions.js +2 -4
- package/dist/dialect/snowflake/function_overrides.js +2 -4
- package/dist/dialect/snowflake/index.js +2 -20
- package/dist/dialect/snowflake/snowflake.js +6 -25
- package/dist/dialect/standardsql/dialect_functions.js +2 -4
- package/dist/dialect/standardsql/function_overrides.js +2 -4
- package/dist/dialect/standardsql/index.js +2 -20
- package/dist/dialect/standardsql/standardsql.js +2 -20
- package/dist/dialect/tiny_parser.js +2 -4
- package/dist/dialect/trino/dialect_functions.js +2 -4
- package/dist/dialect/trino/function_overrides.js +2 -4
- package/dist/dialect/trino/index.js +2 -20
- package/dist/dialect/trino/trino.d.ts +1 -0
- package/dist/dialect/trino/trino.js +29 -26
- package/dist/index.js +4 -22
- package/dist/lang/ast/ast-utils.js +2 -20
- package/dist/lang/ast/error-factory.js +2 -20
- package/dist/lang/ast/expressions/apply.js +2 -20
- package/dist/lang/ast/expressions/binary-boolean.js +2 -20
- package/dist/lang/ast/expressions/binary-numeric.js +2 -20
- package/dist/lang/ast/expressions/boolean.js +2 -20
- package/dist/lang/ast/expressions/case.js +2 -4
- package/dist/lang/ast/expressions/constant-expression.js +2 -20
- package/dist/lang/ast/expressions/expr-add-sub.js +2 -20
- package/dist/lang/ast/expressions/expr-aggregate-function.js +2 -20
- package/dist/lang/ast/expressions/expr-alternation-tree.js +2 -20
- package/dist/lang/ast/expressions/expr-array-literal.js +2 -4
- package/dist/lang/ast/expressions/expr-asymmetric.js +2 -20
- package/dist/lang/ast/expressions/expr-avg.js +2 -20
- package/dist/lang/ast/expressions/expr-cast.js +2 -20
- package/dist/lang/ast/expressions/expr-coalesce.js +2 -20
- package/dist/lang/ast/expressions/expr-compare.js +2 -20
- package/dist/lang/ast/expressions/expr-count-distinct.js +2 -20
- package/dist/lang/ast/expressions/expr-count.js +2 -20
- package/dist/lang/ast/expressions/expr-filter-expr.js +2 -4
- package/dist/lang/ast/expressions/expr-func.js +6 -24
- package/dist/lang/ast/expressions/expr-granular-time.js +2 -20
- package/dist/lang/ast/expressions/expr-id-reference.js +2 -20
- package/dist/lang/ast/expressions/expr-logical-op.js +2 -20
- package/dist/lang/ast/expressions/expr-max.js +2 -20
- package/dist/lang/ast/expressions/expr-min.js +2 -20
- package/dist/lang/ast/expressions/expr-minus.js +2 -20
- package/dist/lang/ast/expressions/expr-mul-div.js +2 -20
- package/dist/lang/ast/expressions/expr-not.js +2 -20
- package/dist/lang/ast/expressions/expr-now.js +2 -20
- package/dist/lang/ast/expressions/expr-null.js +2 -20
- package/dist/lang/ast/expressions/expr-number.js +2 -20
- package/dist/lang/ast/expressions/expr-parens.js +2 -20
- package/dist/lang/ast/expressions/expr-props.js +2 -20
- package/dist/lang/ast/expressions/expr-record-literal.js +2 -4
- package/dist/lang/ast/expressions/expr-regex.js +2 -20
- package/dist/lang/ast/expressions/expr-string.js +4 -0
- package/dist/lang/ast/expressions/expr-sum.js +2 -20
- package/dist/lang/ast/expressions/expr-time-extract.js +2 -20
- package/dist/lang/ast/expressions/expr-time.js +2 -20
- package/dist/lang/ast/expressions/expr-ungroup.js +2 -20
- package/dist/lang/ast/expressions/for-range.js +2 -20
- package/dist/lang/ast/expressions/function-ordering.js +2 -20
- package/dist/lang/ast/expressions/grouped_by.js +2 -4
- package/dist/lang/ast/expressions/partial-compare.js +2 -20
- package/dist/lang/ast/expressions/partition_by.js +2 -20
- package/dist/lang/ast/expressions/pick-when.js +2 -20
- package/dist/lang/ast/expressions/range.js +2 -20
- package/dist/lang/ast/expressions/time-frame.js +2 -20
- package/dist/lang/ast/expressions/time-literal.js +2 -20
- package/dist/lang/ast/expressions/unary.js +2 -20
- package/dist/lang/ast/field-space/ast-view-field.js +2 -20
- package/dist/lang/ast/field-space/column-space-field.js +2 -20
- package/dist/lang/ast/field-space/def-space.js +2 -4
- package/dist/lang/ast/field-space/dynamic-space.js +4 -22
- package/dist/lang/ast/field-space/include-utils.js +6 -8
- package/dist/lang/ast/field-space/index-field-space.js +2 -20
- package/dist/lang/ast/field-space/ir-view-field.js +2 -20
- package/dist/lang/ast/field-space/join-space-field.js +2 -20
- package/dist/lang/ast/field-space/parameter-space.js +2 -4
- package/dist/lang/ast/field-space/passthrough-space.js +2 -4
- package/dist/lang/ast/field-space/permissive-space.js +2 -4
- package/dist/lang/ast/field-space/project-field-space.js +2 -20
- package/dist/lang/ast/field-space/query-input-space.js +2 -20
- package/dist/lang/ast/field-space/query-spaces.js +8 -28
- package/dist/lang/ast/field-space/reference-field.js +5 -21
- package/dist/lang/ast/field-space/refine-from-space-field.js +2 -4
- package/dist/lang/ast/field-space/refined-space.js +8 -26
- package/dist/lang/ast/field-space/rename-space-field.js +8 -29
- package/dist/lang/ast/field-space/static-space.js +3 -21
- package/dist/lang/ast/field-space/struct-space-field-base.js +3 -21
- package/dist/lang/ast/field-space/view-field.js +2 -20
- package/dist/lang/ast/index.js +2 -20
- package/dist/lang/ast/parameters/argument.js +2 -4
- package/dist/lang/ast/parameters/has-parameter.js +2 -20
- package/dist/lang/ast/query-builders/index-builder.js +2 -20
- package/dist/lang/ast/query-builders/partial-builder.js +4 -0
- package/dist/lang/ast/query-builders/project-builder.js +2 -20
- package/dist/lang/ast/query-builders/reduce-builder.js +2 -20
- package/dist/lang/ast/query-elements/anonymous-query.js +3 -21
- package/dist/lang/ast/query-elements/query-arrow.js +2 -20
- package/dist/lang/ast/query-elements/query-base.js +2 -20
- package/dist/lang/ast/query-elements/query-head-struct.js +2 -20
- package/dist/lang/ast/query-elements/query-raw.js +2 -20
- package/dist/lang/ast/query-elements/query-reference.js +2 -20
- package/dist/lang/ast/query-elements/query-refine.js +2 -20
- package/dist/lang/ast/query-items/field-declaration.js +3 -21
- package/dist/lang/ast/query-items/field-references.js +2 -20
- package/dist/lang/ast/query-items/typecheck_utils.js +2 -20
- package/dist/lang/ast/query-properties/aggregate.js +2 -20
- package/dist/lang/ast/query-properties/calculate.js +2 -20
- package/dist/lang/ast/query-properties/declare-fields.js +2 -20
- package/dist/lang/ast/query-properties/drill.js +5 -10
- package/dist/lang/ast/query-properties/extend.js +2 -20
- package/dist/lang/ast/query-properties/filters.js +2 -20
- package/dist/lang/ast/query-properties/group-by.js +2 -20
- package/dist/lang/ast/query-properties/indexing.js +2 -20
- package/dist/lang/ast/query-properties/limit.js +2 -20
- package/dist/lang/ast/query-properties/nest.js +6 -21
- package/dist/lang/ast/query-properties/nests.js +2 -20
- package/dist/lang/ast/query-properties/ordering.js +2 -20
- package/dist/lang/ast/query-properties/project-statement.js +2 -20
- package/dist/lang/ast/query-properties/qop-desc.js +2 -20
- package/dist/lang/ast/query-properties/sampling.js +2 -20
- package/dist/lang/ast/query-utils.js +2 -20
- package/dist/lang/ast/source-elements/composite-source.js +3 -6
- package/dist/lang/ast/source-elements/named-source.js +2 -23
- package/dist/lang/ast/source-elements/query-source.js +2 -22
- package/dist/lang/ast/source-elements/refined-source.js +2 -22
- package/dist/lang/ast/source-elements/source.js +2 -20
- package/dist/lang/ast/source-elements/sql-source.js +8 -33
- package/dist/lang/ast/source-elements/table-source.js +11 -32
- package/dist/lang/ast/source-elements/typed-source.js +2 -3
- package/dist/lang/ast/source-elements/virtual-source.js +1 -2
- package/dist/lang/ast/source-properties/dimensions.js +2 -20
- package/dist/lang/ast/source-properties/field-list-edit.js +2 -20
- package/dist/lang/ast/source-properties/join.js +7 -31
- package/dist/lang/ast/source-properties/measures.js +2 -20
- package/dist/lang/ast/source-properties/primary-key.js +2 -20
- package/dist/lang/ast/source-properties/renames.js +3 -21
- package/dist/lang/ast/source-properties/timezone-statement.js +2 -20
- package/dist/lang/ast/source-properties/user-type-shape.js +9 -4
- package/dist/lang/ast/source-properties/view-field-declaration.js +6 -21
- package/dist/lang/ast/source-properties/views.js +2 -20
- package/dist/lang/ast/source-query-elements/include-item.js +2 -4
- package/dist/lang/ast/source-query-elements/source-query-element.js +2 -20
- package/dist/lang/ast/source-query-elements/sq-arrow.js +2 -20
- package/dist/lang/ast/source-query-elements/sq-compose.js +2 -4
- package/dist/lang/ast/source-query-elements/sq-extend.js +2 -20
- package/dist/lang/ast/source-query-elements/sq-reference.js +3 -21
- package/dist/lang/ast/source-query-elements/sq-refine.js +2 -20
- package/dist/lang/ast/source-query-elements/sq-source.js +2 -20
- package/dist/lang/ast/sql-elements/sql-string.js +2 -20
- package/dist/lang/ast/statements/define-given.js +2 -2
- package/dist/lang/ast/statements/define-query.js +3 -21
- package/dist/lang/ast/statements/define-source.js +8 -23
- package/dist/lang/ast/statements/define-user-type.js +1 -1
- package/dist/lang/ast/statements/import-statement.js +7 -20
- package/dist/lang/ast/time-utils.js +2 -20
- package/dist/lang/ast/typedesc-utils.js +2 -20
- package/dist/lang/ast/types/annotation-elements.js +2 -20
- package/dist/lang/ast/types/binary_operators.js +2 -4
- package/dist/lang/ast/types/definition-list.js +2 -20
- package/dist/lang/ast/types/dialect-name-space.js +2 -4
- package/dist/lang/ast/types/document-compile-result.js +2 -20
- package/dist/lang/ast/types/expr-result.js +2 -20
- package/dist/lang/ast/types/expr-value.js +2 -20
- package/dist/lang/ast/types/expression-def.js +2 -20
- package/dist/lang/ast/types/field-collection-member.js +2 -20
- package/dist/lang/ast/types/field-prop-statement.js +2 -20
- package/dist/lang/ast/types/field-space.js +2 -20
- package/dist/lang/ast/types/global-name-space.js +2 -20
- package/dist/lang/ast/types/granular-result.js +2 -20
- package/dist/lang/ast/types/literal.d.ts +1 -1
- package/dist/lang/ast/types/literal.js +2 -4
- package/dist/lang/ast/types/lookup-result.js +2 -20
- package/dist/lang/ast/types/malloy-element.d.ts +28 -4
- package/dist/lang/ast/types/malloy-element.js +63 -77
- package/dist/lang/ast/types/model-entry.js +2 -20
- package/dist/lang/ast/types/name-space.js +2 -20
- package/dist/lang/ast/types/noteable.js +2 -20
- package/dist/lang/ast/types/op-desc.js +2 -20
- package/dist/lang/ast/types/pipeline-comp.js +2 -20
- package/dist/lang/ast/types/query-builder.js +2 -20
- package/dist/lang/ast/types/query-comp.js +2 -20
- package/dist/lang/ast/types/query-element.js +2 -20
- package/dist/lang/ast/types/query-extend-property.js +2 -20
- package/dist/lang/ast/types/query-item.js +2 -20
- package/dist/lang/ast/types/query-property-interface.js +2 -20
- package/dist/lang/ast/types/query-property.js +2 -20
- package/dist/lang/ast/types/source-desc.js +2 -20
- package/dist/lang/ast/types/source-property.js +2 -20
- package/dist/lang/ast/types/space-entry.js +2 -20
- package/dist/lang/ast/types/space-field.js +2 -20
- package/dist/lang/ast/types/space-param.js +2 -20
- package/dist/lang/ast/types/time-result.js +2 -20
- package/dist/lang/ast/view-elements/qop-desc-view.js +2 -20
- package/dist/lang/ast/view-elements/reference-view.js +2 -20
- package/dist/lang/ast/view-elements/refine-utils.js +2 -20
- package/dist/lang/ast/view-elements/view-arrow.js +2 -20
- package/dist/lang/ast/view-elements/view-refine.js +2 -20
- package/dist/lang/ast/view-elements/view.js +2 -20
- package/dist/lang/composite-source-utils.js +15 -21
- package/dist/lang/field-utils.js +4 -22
- package/dist/lang/index.js +2 -20
- package/dist/lang/malloy-parse-info.js +2 -20
- package/dist/lang/malloy-to-ast.d.ts +1 -1
- package/dist/lang/malloy-to-ast.js +2 -21
- package/dist/lang/malloy-to-stable-query.js +2 -4
- package/dist/lang/parse-log.js +2 -20
- package/dist/lang/parse-malloy.d.ts +1 -9
- package/dist/lang/parse-malloy.js +8 -50
- package/dist/lang/parse-tree-walkers/document-completion-walker.js +2 -20
- package/dist/lang/parse-tree-walkers/document-help-context-walker.js +2 -20
- package/dist/lang/parse-tree-walkers/document-symbol-walker.js +2 -20
- package/dist/lang/parse-tree-walkers/explore-query-walker.js +2 -20
- package/dist/lang/parse-tree-walkers/find-external-references.js +2 -20
- package/dist/lang/parse-tree-walkers/find-table-path-walker.js +2 -20
- package/dist/lang/parse-utils.js +2 -20
- package/dist/lang/reference-list.js +2 -20
- package/dist/lang/run-malloy-parser.js +2 -4
- package/dist/lang/syntax-errors/custom-error-messages.js +2 -4
- package/dist/lang/syntax-errors/malloy-error-strategy.js +2 -4
- package/dist/lang/syntax-errors/malloy-parser-error-listener.js +2 -4
- package/dist/lang/test/expr-to-str.js +2 -4
- package/dist/lang/test/parse-expects.js +2 -20
- package/dist/lang/test/test-translator.js +6 -29
- package/dist/lang/translate-response.d.ts +1 -5
- package/dist/lang/translate-response.js +2 -20
- package/dist/lang/utils.js +2 -20
- package/dist/lang/zone.js +2 -20
- package/dist/model/annotation_utils.d.ts +37 -0
- package/dist/model/annotation_utils.js +85 -0
- package/dist/model/field_instance.js +1 -1
- package/dist/model/filter_compilers.js +2 -4
- package/dist/model/index.d.ts +2 -1
- package/dist/model/index.js +6 -21
- package/dist/model/malloy_types.d.ts +43 -9
- package/dist/model/malloy_types.js +13 -29
- package/dist/model/query_model_impl.d.ts +0 -1
- package/dist/model/query_model_impl.js +9 -28
- package/dist/model/query_node.d.ts +1 -13
- package/dist/model/query_node.js +8 -52
- package/dist/model/query_query.js +4 -18
- package/dist/model/source_def_utils.js +0 -2
- package/dist/model/sql_block.js +2 -20
- package/dist/model/utils.d.ts +9 -2
- package/dist/model/utils.js +18 -24
- package/dist/run_sql_options.d.ts +0 -5
- package/dist/run_sql_options.js +2 -20
- package/dist/runtime_types.js +2 -20
- package/dist/test/cellsToObject.js +2 -4
- package/dist/timing.js +2 -4
- package/dist/to_stable.js +9 -13
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/lang/parse-tree-walkers/model-annotation-walker.d.ts +0 -5
- package/dist/lang/parse-tree-walkers/model-annotation-walker.js +0 -50
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.JoinStatement = exports.ExpressionJoin = exports.KeyJoin = exports.Join = void 0;
|
|
@@ -62,30 +44,27 @@ class KeyJoin extends Join {
|
|
|
62
44
|
this.elementType = 'joinOnKey';
|
|
63
45
|
}
|
|
64
46
|
getStructDef(parameterSpace) {
|
|
65
|
-
var _a;
|
|
66
47
|
const sourceDef = this.getStructDefFromExpr(parameterSpace);
|
|
67
48
|
if (!(0, malloy_types_1.isJoinable)(sourceDef)) {
|
|
68
49
|
throw this.internalError(`Cannot join struct type '${sourceDef.type}'`);
|
|
69
50
|
}
|
|
70
51
|
const joinStruct = {
|
|
71
52
|
...sourceDef,
|
|
72
|
-
|
|
53
|
+
as: this.name.refString,
|
|
73
54
|
join: 'one',
|
|
74
55
|
matrixOperation: 'left',
|
|
75
56
|
onExpression: { node: 'error', message: "('join fixup'='not done yet')" },
|
|
76
57
|
location: this.location,
|
|
77
58
|
};
|
|
78
|
-
delete joinStruct.as;
|
|
79
59
|
if (this.note) {
|
|
80
|
-
joinStruct.annotations = this.note;
|
|
60
|
+
joinStruct.annotations = { ...this.note };
|
|
81
61
|
}
|
|
82
|
-
(_a = this.document()) === null || _a === void 0 ? void 0 : _a.rememberToAddModelAnnotations(joinStruct);
|
|
83
62
|
return joinStruct;
|
|
84
63
|
}
|
|
85
64
|
fixupJoinOn(outer, inStruct) {
|
|
86
65
|
const exprX = this.keyExpr.getExpression(outer);
|
|
87
66
|
if ((0, malloy_types_1.isSourceDef)(inStruct) && inStruct.primaryKey) {
|
|
88
|
-
const pkey = inStruct.fields.find(f => (
|
|
67
|
+
const pkey = inStruct.fields.find(f => (0, malloy_types_1.activeName)(f) === inStruct.primaryKey);
|
|
89
68
|
if (pkey) {
|
|
90
69
|
if (pkey.type === exprX.type) {
|
|
91
70
|
const keyPath = [this.name.refString, inStruct.primaryKey];
|
|
@@ -149,7 +128,6 @@ class ExpressionJoin extends Join {
|
|
|
149
128
|
inStruct.refSummary = exprX.refSummary;
|
|
150
129
|
}
|
|
151
130
|
getStructDef(parameterSpace) {
|
|
152
|
-
var _a;
|
|
153
131
|
const source = this.sourceExpr.getSource();
|
|
154
132
|
if (!source) {
|
|
155
133
|
this.sourceExpr.sqLog('invalid-join-source', 'Cannot create a source to join from');
|
|
@@ -165,16 +143,14 @@ class ExpressionJoin extends Join {
|
|
|
165
143
|
}
|
|
166
144
|
const joinStruct = {
|
|
167
145
|
...sourceDef,
|
|
168
|
-
|
|
146
|
+
as: this.name.refString,
|
|
169
147
|
join: this.joinType,
|
|
170
148
|
matrixOperation,
|
|
171
149
|
location: this.location,
|
|
172
150
|
};
|
|
173
|
-
delete joinStruct.as;
|
|
174
151
|
if (this.note) {
|
|
175
|
-
joinStruct.annotations = this.note;
|
|
152
|
+
joinStruct.annotations = { ...this.note };
|
|
176
153
|
}
|
|
177
|
-
(_a = this.document()) === null || _a === void 0 ? void 0 : _a.rememberToAddModelAnnotations(joinStruct);
|
|
178
154
|
return joinStruct;
|
|
179
155
|
}
|
|
180
156
|
}
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.Measures = void 0;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.PrimaryKey = void 0;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.Renames = exports.RenameField = void 0;
|
|
@@ -61,7 +43,7 @@ class RenameField extends malloy_element_1.MalloyElement {
|
|
|
61
43
|
*/
|
|
62
44
|
if (oldValue.found) {
|
|
63
45
|
if (oldValue.found instanceof space_field_1.SpaceField) {
|
|
64
|
-
fs.renameEntry(this.oldName.refString, this.newName, new rename_space_field_1.RenameSpaceField(oldValue.found, this.newName, this.location, this.note));
|
|
46
|
+
fs.renameEntry(this.oldName.refString, this.newName, new rename_space_field_1.RenameSpaceField(oldValue.found, this.newName, this.location, this.note ? { ...this.note } : undefined));
|
|
65
47
|
}
|
|
66
48
|
else {
|
|
67
49
|
this.logError('failed-rename', `'${this.oldName}' cannot be renamed`);
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.TimezoneStatement = void 0;
|
|
@@ -29,7 +29,7 @@ class UserTypeMemberDef extends UserTypeMember {
|
|
|
29
29
|
typeDef: this.typeDef,
|
|
30
30
|
};
|
|
31
31
|
if (this.note) {
|
|
32
|
-
field.annotations = this.note;
|
|
32
|
+
field.annotations = { ...this.note };
|
|
33
33
|
}
|
|
34
34
|
return field;
|
|
35
35
|
}
|
|
@@ -77,11 +77,16 @@ class UserTypeMemberIndirect extends UserTypeMember {
|
|
|
77
77
|
const field = { name: this.name, typeDef };
|
|
78
78
|
if (this.note) {
|
|
79
79
|
field.annotations = modelEntry.entry.annotations
|
|
80
|
-
? {
|
|
81
|
-
|
|
80
|
+
? {
|
|
81
|
+
...this.note,
|
|
82
|
+
inherits: modelEntry.entry.annotations,
|
|
83
|
+
}
|
|
84
|
+
: { ...this.note };
|
|
82
85
|
}
|
|
83
86
|
else if (modelEntry.entry.annotations) {
|
|
84
|
-
field.annotations = {
|
|
87
|
+
field.annotations = {
|
|
88
|
+
inherits: modelEntry.entry.annotations,
|
|
89
|
+
};
|
|
85
90
|
}
|
|
86
91
|
return field;
|
|
87
92
|
}
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.ViewFieldDeclaration = void 0;
|
|
@@ -50,7 +32,10 @@ class ViewFieldDeclaration extends malloy_element_1.MalloyElement {
|
|
|
50
32
|
type: 'turtle',
|
|
51
33
|
name: this.name,
|
|
52
34
|
pipeline: checkedPipeline,
|
|
53
|
-
annotations: {
|
|
35
|
+
annotations: {
|
|
36
|
+
...this.note,
|
|
37
|
+
inherits: annotations,
|
|
38
|
+
},
|
|
54
39
|
location: this.location,
|
|
55
40
|
};
|
|
56
41
|
return def;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.Views = void 0;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
7
5
|
*/
|
|
8
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
7
|
exports.IncludeListItem = exports.IncludeExceptItem = exports.IncludeAccessItem = exports.IncludeItem = void 0;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.SourceQueryElement = void 0;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.SQArrow = void 0;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
7
5
|
*/
|
|
8
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
7
|
exports.SQCompose = void 0;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.SQExtend = void 0;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.SQReference = void 0;
|
|
@@ -52,7 +34,7 @@ class SQReference extends source_query_element_1.SourceQueryElement {
|
|
|
52
34
|
return query;
|
|
53
35
|
}
|
|
54
36
|
else {
|
|
55
|
-
const label = entry.type === 'given' ? entry.name :
|
|
37
|
+
const label = entry.type === 'given' ? entry.name : (0, model_1.activeName)(entry);
|
|
56
38
|
this.sqLog('cannot-use-as-query', `Illegal reference to '${label}', query expected`);
|
|
57
39
|
}
|
|
58
40
|
}
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.SQRefine = void 0;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.SQSource = void 0;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.SQLString = void 0;
|
|
@@ -173,7 +173,7 @@ class GivenDeclaration extends malloy_element_1.MalloyElement {
|
|
|
173
173
|
defaultText,
|
|
174
174
|
givenUsage,
|
|
175
175
|
location: this.location,
|
|
176
|
-
annotations: this.note,
|
|
176
|
+
annotations: this.note ? { ...this.note } : undefined,
|
|
177
177
|
...(this.inline ? { inline: true } : {}),
|
|
178
178
|
};
|
|
179
179
|
doc.documentGivens.set(id, givenIR);
|
|
@@ -195,7 +195,7 @@ class GivenDeclaration extends malloy_element_1.MalloyElement {
|
|
|
195
195
|
},
|
|
196
196
|
definition: {
|
|
197
197
|
type: (0, utils_1.typeDefToString)(this.typeDef),
|
|
198
|
-
annotations: this.note,
|
|
198
|
+
annotations: this.note ? { ...this.note } : undefined,
|
|
199
199
|
location: this.location,
|
|
200
200
|
defaultText,
|
|
201
201
|
},
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.DefineQueryList = exports.DefineQuery = void 0;
|
|
@@ -54,7 +36,7 @@ class DefineQuery extends malloy_element_1.MalloyElement {
|
|
|
54
36
|
if (this.note) {
|
|
55
37
|
entry.annotations = entry.annotations
|
|
56
38
|
? { ...this.note, inherits: entry.annotations }
|
|
57
|
-
: this.note;
|
|
39
|
+
: { ...this.note };
|
|
58
40
|
}
|
|
59
41
|
doc.setEntry(this.name, { entry, exported: true });
|
|
60
42
|
}
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
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.
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
23
5
|
*/
|
|
24
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
7
|
exports.DefineSourceList = exports.DefineSource = void 0;
|
|
@@ -70,8 +52,11 @@ class DefineSource extends malloy_element_1.MalloyElement {
|
|
|
70
52
|
};
|
|
71
53
|
if (this.note) {
|
|
72
54
|
entry.annotations = structDef.annotations
|
|
73
|
-
? {
|
|
74
|
-
|
|
55
|
+
? {
|
|
56
|
+
...this.note,
|
|
57
|
+
inherits: structDef.annotations,
|
|
58
|
+
}
|
|
59
|
+
: { ...this.note };
|
|
75
60
|
}
|
|
76
61
|
if ((0, malloy_types_1.isPersistableSourceDef)(entry)) {
|
|
77
62
|
entry.sourceID = (0, source_def_utils_1.mkSourceID)(this.name, (_b = this.location) === null || _b === void 0 ? void 0 : _b.url);
|
|
@@ -97,7 +82,7 @@ class DefineSource extends malloy_element_1.MalloyElement {
|
|
|
97
82
|
}
|
|
98
83
|
validateParameterShadowing(parameters, structDef) {
|
|
99
84
|
for (const parameter of parameters) {
|
|
100
|
-
if (structDef.fields.find(field =>
|
|
85
|
+
if (structDef.fields.find(field => (0, malloy_types_1.activeName)(field) === parameter.name)) {
|
|
101
86
|
parameter.logError('parameter-shadowing-field', `Illegal shadowing of field \`${parameter.name}\` by parameter with the same name`);
|
|
102
87
|
}
|
|
103
88
|
}
|