@malloydata/malloy 0.0.22-dev230126015148 → 0.0.22-dev230202171033
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/ast-main.d.ts +18 -815
- package/dist/lang/ast/ast-main.js +106 -3241
- package/dist/lang/ast/ast-utils.d.ts +10 -0
- package/dist/lang/ast/ast-utils.js +42 -0
- package/dist/lang/ast/elements/define-explore.d.ts +17 -0
- package/dist/lang/ast/elements/define-explore.js +79 -0
- package/dist/lang/ast/elements/define-query.d.ts +14 -0
- package/dist/lang/ast/elements/define-query.js +56 -0
- package/dist/lang/ast/elements/mallobj.d.ts +12 -0
- package/dist/lang/ast/elements/mallobj.js +53 -0
- package/dist/lang/ast/elements/pipeline-desc.d.ts +28 -0
- package/dist/lang/ast/elements/pipeline-desc.js +102 -0
- package/dist/lang/ast/elements/refined-explore.d.ts +15 -0
- package/dist/lang/ast/elements/refined-explore.js +121 -0
- package/dist/lang/ast/error-factory.d.ts +9 -0
- package/dist/lang/ast/error-factory.js +61 -0
- package/dist/lang/ast/executors/index-executor.d.ts +18 -0
- package/dist/lang/ast/executors/index-executor.js +96 -0
- package/dist/lang/ast/executors/project-executor.d.ts +10 -0
- package/dist/lang/ast/executors/project-executor.js +68 -0
- package/dist/lang/ast/executors/reduce-executor.d.ts +20 -0
- package/dist/lang/ast/executors/reduce-executor.js +149 -0
- package/dist/lang/ast/explore-properties/field-list-edit.d.ts +8 -0
- package/dist/lang/ast/explore-properties/field-list-edit.js +36 -0
- package/dist/lang/ast/explore-properties/primary-key.d.ts +7 -0
- package/dist/lang/ast/{apply-expr.js → explore-properties/primary-key.js} +9 -8
- package/dist/lang/ast/explore-properties/renames.d.ts +11 -0
- package/dist/lang/ast/explore-properties/renames.js +43 -0
- package/dist/lang/ast/explore-properties/turtles.d.ts +5 -0
- package/dist/lang/ast/explore-properties/turtles.js +33 -0
- package/dist/lang/ast/expressions/apply.d.ts +8 -0
- package/dist/lang/ast/expressions/apply.js +37 -0
- package/dist/lang/ast/expressions/binary-boolean.d.ts +12 -0
- package/dist/lang/ast/expressions/binary-boolean.js +54 -0
- package/dist/lang/ast/expressions/binary-numeric.d.ts +11 -0
- package/dist/lang/ast/expressions/binary-numeric.js +42 -0
- package/dist/lang/ast/expressions/boolean.d.ts +8 -0
- package/dist/lang/ast/expressions/boolean.js +39 -0
- package/dist/lang/ast/expressions/constant-sub-expression.d.ts +16 -0
- package/dist/lang/ast/expressions/constant-sub-expression.js +98 -0
- package/dist/lang/ast/expressions/expr-add-sub.d.ts +4 -0
- package/dist/lang/ast/expressions/expr-add-sub.js +34 -0
- package/dist/lang/ast/expressions/expr-aggregate-function.d.ts +15 -0
- package/dist/lang/ast/expressions/expr-aggregate-function.js +99 -0
- package/dist/lang/ast/expressions/expr-alternation-tree.d.ts +11 -0
- package/dist/lang/ast/expressions/expr-alternation-tree.js +54 -0
- package/dist/lang/ast/expressions/expr-asymmetric.d.ts +10 -0
- package/dist/lang/ast/expressions/expr-asymmetric.js +27 -0
- package/dist/lang/ast/expressions/expr-avg.d.ts +6 -0
- package/dist/lang/ast/expressions/expr-avg.js +34 -0
- package/dist/lang/ast/expressions/expr-case.d.ts +11 -0
- package/dist/lang/ast/expressions/expr-case.js +84 -0
- package/dist/lang/ast/expressions/expr-cast.d.ts +13 -0
- package/dist/lang/ast/expressions/expr-cast.js +29 -0
- package/dist/lang/ast/expressions/expr-compare.d.ts +10 -0
- package/dist/lang/ast/expressions/expr-compare.js +48 -0
- package/dist/lang/ast/expressions/expr-count-distinct.d.ts +6 -0
- package/dist/lang/ast/expressions/expr-count-distinct.js +35 -0
- package/dist/lang/ast/expressions/expr-count.d.ts +11 -0
- package/dist/lang/ast/expressions/expr-count.js +57 -0
- package/dist/lang/ast/expressions/expr-filter.d.ts +12 -0
- package/dist/lang/ast/expressions/expr-filter.js +69 -0
- package/dist/lang/ast/expressions/expr-func.d.ts +10 -0
- package/dist/lang/ast/expressions/expr-func.js +63 -0
- package/dist/lang/ast/expressions/expr-granular-time.d.ts +24 -0
- package/dist/lang/ast/expressions/expr-granular-time.js +117 -0
- package/dist/lang/ast/expressions/expr-id-reference.d.ts +12 -0
- package/dist/lang/ast/expressions/expr-id-reference.js +76 -0
- package/dist/lang/ast/expressions/expr-logical-op.d.ts +9 -0
- package/dist/lang/ast/expressions/expr-logical-op.js +36 -0
- package/dist/lang/ast/expressions/expr-max.d.ts +9 -0
- package/dist/lang/ast/expressions/expr-max.js +16 -0
- package/dist/lang/ast/expressions/expr-min.d.ts +9 -0
- package/dist/lang/ast/expressions/expr-min.js +16 -0
- package/dist/lang/ast/expressions/expr-minus.d.ts +9 -0
- package/dist/lang/ast/expressions/expr-minus.js +48 -0
- package/dist/lang/ast/expressions/expr-mul-div.d.ts +4 -0
- package/dist/lang/ast/expressions/expr-mul-div.js +34 -0
- package/dist/lang/ast/expressions/expr-not.d.ts +10 -0
- package/dist/lang/ast/expressions/expr-not.js +49 -0
- package/dist/lang/ast/expressions/expr-now.d.ts +7 -0
- package/dist/lang/ast/expressions/expr-now.js +46 -0
- package/dist/lang/ast/expressions/expr-null.d.ts +6 -0
- package/dist/lang/ast/expressions/expr-null.js +41 -0
- package/dist/lang/ast/expressions/expr-number.d.ts +10 -0
- package/dist/lang/ast/expressions/expr-number.js +42 -0
- package/dist/lang/ast/expressions/expr-parens.d.ts +10 -0
- package/dist/lang/ast/expressions/expr-parens.js +42 -0
- package/dist/lang/ast/expressions/expr-regex.d.ts +8 -0
- package/dist/lang/ast/expressions/expr-regex.js +42 -0
- package/dist/lang/ast/expressions/expr-string.d.ts +9 -0
- package/dist/lang/ast/expressions/expr-string.js +50 -0
- package/dist/lang/ast/expressions/expr-sum.d.ts +6 -0
- package/dist/lang/ast/expressions/expr-sum.js +12 -0
- package/dist/lang/ast/expressions/expr-time-extract.d.ts +13 -0
- package/dist/lang/ast/expressions/expr-time-extract.js +117 -0
- package/dist/lang/ast/expressions/expr-time.d.ts +11 -0
- package/dist/lang/ast/expressions/expr-time.js +62 -0
- package/dist/lang/ast/expressions/expr-ungroup.d.ts +14 -0
- package/dist/lang/ast/expressions/expr-ungroup.js +83 -0
- package/dist/lang/ast/expressions/for-range.d.ts +19 -0
- package/dist/lang/ast/expressions/for-range.js +101 -0
- package/dist/lang/ast/expressions/granular-literal.d.ts +20 -0
- package/dist/lang/ast/expressions/granular-literal.js +148 -0
- package/dist/lang/ast/expressions/partial-compare.d.ts +14 -0
- package/dist/lang/ast/expressions/partial-compare.js +50 -0
- package/dist/lang/ast/expressions/pick-when.d.ts +19 -0
- package/dist/lang/ast/expressions/pick-when.js +156 -0
- package/dist/lang/ast/expressions/range.d.ts +12 -0
- package/dist/lang/ast/expressions/range.js +80 -0
- package/dist/lang/ast/expressions/time-frame.d.ts +7 -0
- package/dist/lang/ast/expressions/time-frame.js +40 -0
- package/dist/lang/ast/expressions/top-by.d.ts +10 -0
- package/dist/lang/ast/expressions/top-by.js +51 -0
- package/dist/lang/ast/expressions/unary.d.ts +5 -0
- package/dist/lang/ast/expressions/unary.js +34 -0
- package/dist/lang/ast/expressions/utils.d.ts +15 -0
- package/dist/lang/ast/expressions/utils.js +106 -0
- package/dist/lang/ast/expressions/when-clause.d.ts +10 -0
- package/dist/lang/ast/expressions/when-clause.js +17 -0
- package/dist/lang/ast/fragtype-utils.d.ts +39 -0
- package/dist/lang/ast/fragtype-utils.js +100 -0
- package/dist/lang/ast/import-elements/import-statement.d.ts +9 -0
- package/dist/lang/ast/import-elements/import-statement.js +78 -0
- package/dist/lang/ast/index.d.ts +94 -3
- package/dist/lang/ast/index.js +94 -3
- package/dist/lang/ast/json-elements/json-element.d.ts +6 -0
- package/dist/lang/ast/json-elements/json-element.js +41 -0
- package/dist/lang/ast/json-elements/json-struct-def.d.ts +10 -0
- package/dist/lang/ast/json-elements/json-struct-def.js +48 -0
- package/dist/lang/ast/nesting/nest-reference.d.ts +7 -0
- package/dist/lang/ast/nesting/nest-reference.js +35 -0
- package/dist/lang/ast/parameters/constant-parameter.d.ts +8 -0
- package/dist/lang/ast/parameters/constant-parameter.js +54 -0
- package/dist/lang/ast/parameters/has-parameter.d.ts +19 -0
- package/dist/lang/ast/parameters/has-parameter.js +64 -0
- package/dist/lang/ast/query-elements/anonymous-query.d.ts +9 -0
- package/dist/lang/ast/query-elements/anonymous-query.js +41 -0
- package/dist/lang/ast/query-elements/existing-query.d.ts +11 -0
- package/dist/lang/ast/query-elements/existing-query.js +79 -0
- package/dist/lang/ast/query-elements/full-query.d.ts +10 -0
- package/dist/lang/ast/query-elements/full-query.js +85 -0
- package/dist/lang/ast/query-elements/query-head-struct.d.ts +9 -0
- package/dist/lang/ast/query-elements/query-head-struct.js +48 -0
- package/dist/lang/ast/query-items/field-declaration.d.ts +31 -0
- package/dist/lang/ast/query-items/field-declaration.js +137 -0
- package/dist/lang/ast/query-items/field-references.d.ts +25 -0
- package/dist/lang/ast/query-items/field-references.js +80 -0
- package/dist/lang/ast/query-properties/aggregate.d.ts +5 -0
- package/dist/lang/ast/query-properties/aggregate.js +39 -0
- package/dist/lang/ast/query-properties/declare-fields.d.ts +5 -0
- package/dist/lang/ast/query-properties/declare-fields.js +33 -0
- package/dist/lang/ast/query-properties/dimmensions.d.ts +5 -0
- package/dist/lang/ast/query-properties/dimmensions.js +36 -0
- package/dist/lang/ast/query-properties/filters.d.ts +18 -0
- package/dist/lang/ast/query-properties/filters.js +89 -0
- package/dist/lang/ast/query-properties/group-by.d.ts +5 -0
- package/dist/lang/ast/query-properties/group-by.js +39 -0
- package/dist/lang/ast/query-properties/indexing.d.ts +10 -0
- package/dist/lang/ast/query-properties/indexing.js +39 -0
- package/dist/lang/ast/query-properties/joins.d.ts +36 -0
- package/dist/lang/ast/query-properties/joins.js +143 -0
- package/dist/lang/ast/query-properties/limit.d.ts +6 -0
- package/dist/lang/ast/query-properties/limit.js +35 -0
- package/dist/lang/ast/query-properties/measures.d.ts +5 -0
- package/dist/lang/ast/query-properties/measures.js +36 -0
- package/dist/lang/ast/query-properties/nests.d.ts +5 -0
- package/dist/lang/ast/query-properties/nests.js +33 -0
- package/dist/lang/ast/query-properties/ordering.d.ts +15 -0
- package/dist/lang/ast/query-properties/ordering.js +66 -0
- package/dist/lang/ast/query-properties/project-statement.d.ts +5 -0
- package/dist/lang/ast/query-properties/project-statement.js +33 -0
- package/dist/lang/ast/query-properties/qop-desc.d.ts +17 -0
- package/dist/lang/ast/query-properties/qop-desc.js +123 -0
- package/dist/lang/ast/query-properties/sampling.d.ts +8 -0
- package/dist/lang/ast/query-properties/sampling.js +38 -0
- package/dist/lang/ast/query-properties/top.d.ts +13 -0
- package/dist/lang/ast/query-properties/top.js +60 -0
- package/dist/lang/ast/result-spaces/index-field-space.d.ts +10 -0
- package/dist/lang/ast/result-spaces/index-field-space.js +57 -0
- package/dist/lang/ast/result-spaces/project-field-space.d.ts +6 -0
- package/dist/lang/ast/result-spaces/project-field-space.js +51 -0
- package/dist/lang/ast/result-spaces/reduce-field-space.d.ts +7 -0
- package/dist/lang/ast/result-spaces/reduce-field-space.js +37 -0
- package/dist/lang/ast/sources/named-source.d.ts +19 -0
- package/dist/lang/ast/sources/named-source.js +147 -0
- package/dist/lang/ast/sources/query-source.d.ts +9 -0
- package/dist/lang/ast/sources/query-source.js +41 -0
- package/dist/lang/ast/sources/sql-source.d.ts +7 -0
- package/dist/lang/ast/sources/sql-source.js +54 -0
- package/dist/lang/ast/sources/table-source.d.ts +8 -0
- package/dist/lang/ast/sources/table-source.js +60 -0
- package/dist/lang/ast/space-fields/column-space-field.d.ts +9 -0
- package/dist/lang/ast/space-fields/column-space-field.js +40 -0
- package/dist/lang/ast/space-fields/join-space-field.d.ts +8 -0
- package/dist/lang/ast/space-fields/join-space-field.js +35 -0
- package/dist/lang/ast/space-fields/query-field-struct.d.ts +10 -0
- package/dist/lang/ast/space-fields/query-field-struct.js +46 -0
- package/dist/lang/ast/space-fields/query-space-field.d.ts +11 -0
- package/dist/lang/ast/space-fields/query-space-field.js +37 -0
- package/dist/lang/ast/space-fields/reference-field.d.ts +11 -0
- package/dist/lang/ast/space-fields/reference-field.js +45 -0
- package/dist/lang/ast/space-fields/rename-space-field.d.ts +11 -0
- package/dist/lang/ast/space-fields/rename-space-field.js +50 -0
- package/dist/lang/ast/space-fields/wild-space-field.d.ts +10 -0
- package/dist/lang/ast/space-fields/wild-space-field.js +40 -0
- package/dist/lang/ast/space-parameters/abstract-parameter.d.ts +10 -0
- package/dist/lang/ast/space-parameters/abstract-parameter.js +41 -0
- package/dist/lang/ast/space-parameters/defined-parameter.d.ts +9 -0
- package/dist/lang/ast/space-parameters/defined-parameter.js +40 -0
- package/dist/lang/ast/space-seed.d.ts +17 -0
- package/dist/lang/ast/space-seed.js +59 -0
- package/dist/lang/ast/sql-elements/sql-statement.d.ts +19 -0
- package/dist/lang/ast/sql-elements/sql-statement.js +80 -0
- package/dist/lang/ast/sql-elements/sql-string.d.ts +12 -0
- package/dist/lang/ast/sql-elements/sql-string.js +60 -0
- package/dist/lang/ast/static-space.d.ts +33 -0
- package/dist/lang/ast/static-space.js +167 -0
- package/dist/lang/ast/struct-utils.d.ts +4 -0
- package/dist/lang/ast/struct-utils.js +48 -0
- package/dist/lang/ast/time-utils.d.ts +5 -2
- package/dist/lang/ast/time-utils.js +37 -1
- package/dist/lang/ast/types/comparison.d.ts +11 -0
- package/dist/lang/ast/types/comparison.js +41 -0
- package/dist/lang/ast/types/compart-types.d.ts +10 -0
- package/dist/lang/ast/types/compart-types.js +37 -0
- package/dist/lang/ast/types/document-compile-result.d.ts +8 -0
- package/dist/lang/ast/types/document-compile-result.js +25 -0
- package/dist/lang/ast/types/equality.d.ts +7 -0
- package/dist/lang/ast/types/equality.js +37 -0
- package/dist/lang/ast/types/executor.d.ts +9 -0
- package/dist/lang/ast/types/executor.js +25 -0
- package/dist/lang/ast/types/explore-desc.d.ts +5 -0
- package/dist/lang/ast/types/explore-desc.js +33 -0
- package/dist/lang/ast/types/explore-field.d.ts +5 -0
- package/dist/lang/ast/types/explore-field.js +32 -0
- package/dist/lang/ast/types/explore-property.d.ts +10 -0
- package/dist/lang/ast/types/explore-property.js +43 -0
- package/dist/lang/ast/types/expr-result.d.ts +5 -0
- package/dist/lang/ast/types/expr-result.js +25 -0
- package/dist/lang/ast/types/expr-value.d.ts +3 -0
- package/dist/lang/ast/types/expr-value.js +25 -0
- package/dist/lang/ast/types/expression-def.d.ts +69 -0
- package/dist/lang/ast/types/expression-def.js +346 -0
- package/dist/lang/ast/types/expression-value-type.d.ts +2 -0
- package/dist/lang/ast/types/expression-value-type.js +25 -0
- package/dist/lang/ast/types/field-collection-member.d.ts +5 -0
- package/dist/lang/ast/types/field-collection-member.js +34 -0
- package/dist/lang/ast/types/field-decl.d.ts +7 -0
- package/dist/lang/ast/types/field-decl.js +37 -0
- package/dist/lang/ast/types/field-map.d.ts +2 -0
- package/dist/lang/ast/types/field-map.js +25 -0
- package/dist/lang/ast/types/field-space.d.ts +26 -0
- package/dist/lang/ast/types/field-space.js +48 -0
- package/dist/lang/ast/types/field-type.d.ts +6 -0
- package/dist/lang/ast/types/field-type.js +25 -0
- package/dist/lang/ast/types/field-value-type.d.ts +3 -0
- package/dist/lang/ast/types/field-value-type.js +25 -0
- package/dist/lang/ast/types/frag-type.d.ts +6 -0
- package/dist/lang/ast/types/frag-type.js +25 -0
- package/dist/lang/ast/types/granular-result.d.ts +7 -0
- package/dist/lang/ast/types/granular-result.js +11 -0
- package/dist/lang/ast/types/lookup-result.d.ts +10 -0
- package/dist/lang/ast/types/lookup-result.js +25 -0
- package/dist/lang/ast/types/malloy-element.d.ts +105 -0
- package/dist/lang/ast/types/malloy-element.js +398 -0
- package/dist/lang/ast/types/model-entry.d.ts +6 -0
- package/dist/lang/ast/types/model-entry.js +25 -0
- package/dist/lang/ast/types/name-space.d.ts +5 -0
- package/dist/lang/ast/types/name-space.js +25 -0
- package/dist/lang/ast/types/nested-query.d.ts +3 -0
- package/dist/lang/ast/types/nested-query.js +25 -0
- package/dist/lang/ast/types/op-desc.d.ts +6 -0
- package/dist/lang/ast/types/op-desc.js +25 -0
- package/dist/lang/ast/types/query-comp.d.ts +5 -0
- package/dist/lang/ast/types/query-comp.js +25 -0
- package/dist/lang/ast/types/query-element.d.ts +5 -0
- package/dist/lang/ast/types/query-element.js +32 -0
- package/dist/lang/ast/types/query-item.d.ts +5 -0
- package/dist/lang/ast/types/query-item.js +25 -0
- package/dist/lang/ast/types/query-property.d.ts +17 -0
- package/dist/lang/ast/types/query-property.js +55 -0
- package/dist/lang/ast/types/space-entry.d.ts +5 -0
- package/dist/lang/ast/types/space-entry.js +29 -0
- package/dist/lang/ast/types/space-field.d.ts +10 -0
- package/dist/lang/ast/types/space-field.js +48 -0
- package/dist/lang/ast/types/space-param.d.ts +6 -0
- package/dist/lang/ast/types/space-param.js +34 -0
- package/dist/lang/ast/types/stage-field-type.d.ts +1 -0
- package/dist/lang/ast/types/stage-field-type.js +25 -0
- package/dist/lang/ast/types/time-result.d.ts +6 -0
- package/dist/lang/ast/types/time-result.js +25 -0
- package/dist/lang/ast/types/turtle-headed-pipe.d.ts +7 -0
- package/dist/lang/ast/types/turtle-headed-pipe.js +37 -0
- package/dist/lang/space-field.d.ts +4 -1
- package/dist/lang/space-field.js +4 -3
- package/dist/lang/test/field-symbols.spec.js +25 -21
- package/dist/lang/test/parse.spec.js +4 -3
- package/dist/lang/test/test-translator.d.ts +3 -1
- package/package.json +1 -1
- package/dist/lang/ast/apply-expr.d.ts +0 -3
- package/dist/lang/ast/ast-expr.d.ts +0 -206
- package/dist/lang/ast/ast-expr.js +0 -781
- package/dist/lang/ast/ast-time-expr.d.ts +0 -69
- package/dist/lang/ast/ast-time-expr.js +0 -389
- package/dist/lang/ast/ast-types.d.ts +0 -83
- package/dist/lang/ast/ast-types.js +0 -225
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
//# sourceMappingURL=op-desc.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
//# sourceMappingURL=query-comp.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MalloyElement } from "./malloy-element";
|
|
2
|
+
import { ExistingQuery } from "../query-elements/existing-query";
|
|
3
|
+
import { FullQuery } from "../query-elements/full-query";
|
|
4
|
+
export declare type QueryElement = FullQuery | ExistingQuery;
|
|
5
|
+
export declare function isQueryElement(e: MalloyElement): e is QueryElement;
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.isQueryElement = void 0;
|
|
26
|
+
const existing_query_1 = require("../query-elements/existing-query");
|
|
27
|
+
const full_query_1 = require("../query-elements/full-query");
|
|
28
|
+
function isQueryElement(e) {
|
|
29
|
+
return e instanceof full_query_1.FullQuery || e instanceof existing_query_1.ExistingQuery;
|
|
30
|
+
}
|
|
31
|
+
exports.isQueryElement = isQueryElement;
|
|
32
|
+
//# sourceMappingURL=query-element.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FieldDeclaration } from "../query-items/field-declaration";
|
|
2
|
+
import { FieldReference } from "../query-items/field-references";
|
|
3
|
+
import { NestReference } from "../nesting/nest-reference";
|
|
4
|
+
import { NestDefinition } from "../ast-main";
|
|
5
|
+
export declare type QueryItem = FieldDeclaration | FieldReference | NestDefinition | NestReference;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
//# sourceMappingURL=query-item.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NestDefinition } from "../ast-main";
|
|
2
|
+
import { NestReference } from "../nesting/nest-reference";
|
|
3
|
+
import { MalloyElement } from "./malloy-element";
|
|
4
|
+
import { Aggregate } from "../query-properties/aggregate";
|
|
5
|
+
import { DeclareFields } from "../query-properties/declare-fields";
|
|
6
|
+
import { Filter } from "../query-properties/filters";
|
|
7
|
+
import { GroupBy } from "../query-properties/group-by";
|
|
8
|
+
import { Index } from "../query-properties/indexing";
|
|
9
|
+
import { Joins } from "../query-properties/joins";
|
|
10
|
+
import { Limit } from "../query-properties/limit";
|
|
11
|
+
import { Nests } from "../query-properties/nests";
|
|
12
|
+
import { Ordering } from "../query-properties/ordering";
|
|
13
|
+
import { ProjectStatement } from "../query-properties/project-statement";
|
|
14
|
+
import { SampleProperty } from "../query-properties/sampling";
|
|
15
|
+
import { Top } from "../query-properties/top";
|
|
16
|
+
export declare type QueryProperty = Ordering | Top | Limit | Filter | Index | SampleProperty | Joins | DeclareFields | ProjectStatement | NestReference | NestDefinition | NestReference | Nests | Aggregate | GroupBy;
|
|
17
|
+
export declare function isQueryProperty(q: MalloyElement): q is QueryProperty;
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.isQueryProperty = void 0;
|
|
26
|
+
const ast_main_1 = require("../ast-main");
|
|
27
|
+
const aggregate_1 = require("../query-properties/aggregate");
|
|
28
|
+
const declare_fields_1 = require("../query-properties/declare-fields");
|
|
29
|
+
const filters_1 = require("../query-properties/filters");
|
|
30
|
+
const group_by_1 = require("../query-properties/group-by");
|
|
31
|
+
const indexing_1 = require("../query-properties/indexing");
|
|
32
|
+
const joins_1 = require("../query-properties/joins");
|
|
33
|
+
const limit_1 = require("../query-properties/limit");
|
|
34
|
+
const nests_1 = require("../query-properties/nests");
|
|
35
|
+
const ordering_1 = require("../query-properties/ordering");
|
|
36
|
+
const project_statement_1 = require("../query-properties/project-statement");
|
|
37
|
+
const sampling_1 = require("../query-properties/sampling");
|
|
38
|
+
const top_1 = require("../query-properties/top");
|
|
39
|
+
function isQueryProperty(q) {
|
|
40
|
+
return (q instanceof ordering_1.Ordering ||
|
|
41
|
+
q instanceof top_1.Top ||
|
|
42
|
+
q instanceof limit_1.Limit ||
|
|
43
|
+
q instanceof filters_1.Filter ||
|
|
44
|
+
q instanceof indexing_1.Index ||
|
|
45
|
+
q instanceof sampling_1.SampleProperty ||
|
|
46
|
+
q instanceof joins_1.Joins ||
|
|
47
|
+
q instanceof declare_fields_1.DeclareFields ||
|
|
48
|
+
q instanceof project_statement_1.ProjectStatement ||
|
|
49
|
+
q instanceof aggregate_1.Aggregate ||
|
|
50
|
+
q instanceof nests_1.Nests ||
|
|
51
|
+
(0, ast_main_1.isNestedQuery)(q) ||
|
|
52
|
+
q instanceof group_by_1.GroupBy);
|
|
53
|
+
}
|
|
54
|
+
exports.isQueryProperty = isQueryProperty;
|
|
55
|
+
//# sourceMappingURL=query-property.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.SpaceEntry = void 0;
|
|
26
|
+
class SpaceEntry {
|
|
27
|
+
}
|
|
28
|
+
exports.SpaceEntry = SpaceEntry;
|
|
29
|
+
//# sourceMappingURL=space-entry.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FieldDef, QueryFieldDef } from "../../../model/malloy_types";
|
|
2
|
+
import { SpaceEntry } from "./space-entry";
|
|
3
|
+
import { FieldType } from "./field-type";
|
|
4
|
+
import { FieldSpace } from "./field-space";
|
|
5
|
+
export declare abstract class SpaceField extends SpaceEntry {
|
|
6
|
+
readonly refType = "field";
|
|
7
|
+
protected fieldTypeFromFieldDef(def: FieldDef): FieldType;
|
|
8
|
+
getQueryFieldDef(_fs: FieldSpace): QueryFieldDef | undefined;
|
|
9
|
+
fieldDef(): FieldDef | undefined;
|
|
10
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.SpaceField = void 0;
|
|
26
|
+
const malloy_types_1 = require("../../../model/malloy_types");
|
|
27
|
+
const space_entry_1 = require("./space-entry");
|
|
28
|
+
class SpaceField extends space_entry_1.SpaceEntry {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(...arguments);
|
|
31
|
+
this.refType = "field";
|
|
32
|
+
}
|
|
33
|
+
fieldTypeFromFieldDef(def) {
|
|
34
|
+
const ref = { type: def.type };
|
|
35
|
+
if ((0, malloy_types_1.isFieldTypeDef)(def) && def.expressionType) {
|
|
36
|
+
ref.expressionType = def.expressionType;
|
|
37
|
+
}
|
|
38
|
+
return ref;
|
|
39
|
+
}
|
|
40
|
+
getQueryFieldDef(_fs) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
fieldDef() {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.SpaceField = SpaceField;
|
|
48
|
+
//# sourceMappingURL=space-field.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.SpaceParam = void 0;
|
|
26
|
+
const space_entry_1 = require("./space-entry");
|
|
27
|
+
class SpaceParam extends space_entry_1.SpaceEntry {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
this.refType = "parameter";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.SpaceParam = SpaceParam;
|
|
34
|
+
//# sourceMappingURL=space-param.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type StageFieldType = "turtle";
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
//# sourceMappingURL=stage-field-type.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
//# sourceMappingURL=time-result.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldName } from "./field-space";
|
|
2
|
+
import { PipelineDesc } from "../elements/pipeline-desc";
|
|
3
|
+
export declare abstract class TurtleHeadedPipe extends PipelineDesc {
|
|
4
|
+
_turtleName?: FieldName;
|
|
5
|
+
set turtleName(turtleName: FieldName | undefined);
|
|
6
|
+
get turtleName(): FieldName | undefined;
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.TurtleHeadedPipe = void 0;
|
|
26
|
+
const pipeline_desc_1 = require("../elements/pipeline-desc");
|
|
27
|
+
class TurtleHeadedPipe extends pipeline_desc_1.PipelineDesc {
|
|
28
|
+
set turtleName(turtleName) {
|
|
29
|
+
this._turtleName = turtleName;
|
|
30
|
+
this.has({ turtleName });
|
|
31
|
+
}
|
|
32
|
+
get turtleName() {
|
|
33
|
+
return this._turtleName;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.TurtleHeadedPipe = TurtleHeadedPipe;
|
|
37
|
+
//# sourceMappingURL=turtle-headed-pipe.js.map
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as model from "../model/malloy_types";
|
|
2
|
-
import {
|
|
2
|
+
import { FieldSpace } from "./ast/types/field-space";
|
|
3
|
+
import { FieldReference } from "./ast/query-items/field-references";
|
|
4
|
+
import { FieldType } from "./ast/types/field-type";
|
|
5
|
+
import { SpaceField } from "./ast/types/space-field";
|
|
3
6
|
/**
|
|
4
7
|
* FilteredAliasedName
|
|
5
8
|
*/
|
package/dist/lang/space-field.js
CHANGED
|
@@ -47,12 +47,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.FANSPaceField = void 0;
|
|
49
49
|
const model = __importStar(require("../model/malloy_types"));
|
|
50
|
-
const
|
|
50
|
+
const space_param_1 = require("./ast/types/space-param");
|
|
51
|
+
const space_field_1 = require("./ast/types/space-field");
|
|
51
52
|
// "Space Fields" are a field in a field space
|
|
52
53
|
/**
|
|
53
54
|
* FilteredAliasedName
|
|
54
55
|
*/
|
|
55
|
-
class FANSPaceField extends
|
|
56
|
+
class FANSPaceField extends space_field_1.SpaceField {
|
|
56
57
|
constructor(ref, inSpace, refInit) {
|
|
57
58
|
super();
|
|
58
59
|
this.ref = ref;
|
|
@@ -78,7 +79,7 @@ class FANSPaceField extends ast_main_1.SpaceField {
|
|
|
78
79
|
const fieldType = fieldTypeInfo.type;
|
|
79
80
|
// TODO starting to feel like this should be a method call on a spaceentry
|
|
80
81
|
if (model.isAtomicFieldType(fieldType)) {
|
|
81
|
-
if (fromField instanceof
|
|
82
|
+
if (fromField instanceof space_param_1.SpaceParam) {
|
|
82
83
|
return {
|
|
83
84
|
type: fieldType,
|
|
84
85
|
name: this.as,
|
|
@@ -22,7 +22,11 @@
|
|
|
22
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
const
|
|
25
|
+
const static_space_1 = require("../ast/static-space");
|
|
26
|
+
const column_space_field_1 = require("../ast/space-fields/column-space-field");
|
|
27
|
+
const field_space_1 = require("../ast/types/field-space");
|
|
28
|
+
const query_field_struct_1 = require("../ast/space-fields/query-field-struct");
|
|
29
|
+
const defined_parameter_1 = require("../ast/space-parameters/defined-parameter");
|
|
26
30
|
/*
|
|
27
31
|
** A set of tests to make sure structdefs can become fieldspaces
|
|
28
32
|
** and the fieldspace produces the same strcutdef
|
|
@@ -39,7 +43,7 @@ describe("structdef comprehension", () => {
|
|
|
39
43
|
};
|
|
40
44
|
}
|
|
41
45
|
function fieldRef(fieldPath) {
|
|
42
|
-
return fieldPath.split(".").map((name) => new
|
|
46
|
+
return fieldPath.split(".").map((name) => new field_space_1.FieldName(name));
|
|
43
47
|
}
|
|
44
48
|
test(`import string field`, () => {
|
|
45
49
|
const field = {
|
|
@@ -47,8 +51,8 @@ describe("structdef comprehension", () => {
|
|
|
47
51
|
type: "string",
|
|
48
52
|
};
|
|
49
53
|
const struct = mkStructDef(field);
|
|
50
|
-
const space = new
|
|
51
|
-
expect(space.lookup(fieldRef("t")).found).toBeInstanceOf(
|
|
54
|
+
const space = new static_space_1.StaticSpace(struct);
|
|
55
|
+
expect(space.lookup(fieldRef("t")).found).toBeInstanceOf(column_space_field_1.ColumnSpaceField);
|
|
52
56
|
const oField = space.structDef().fields[0];
|
|
53
57
|
expect(oField).toEqual(field);
|
|
54
58
|
});
|
|
@@ -59,8 +63,8 @@ describe("structdef comprehension", () => {
|
|
|
59
63
|
numberType: "float",
|
|
60
64
|
};
|
|
61
65
|
const struct = mkStructDef(field);
|
|
62
|
-
const space = new
|
|
63
|
-
expect(space.lookup(fieldRef("t")).found).toBeInstanceOf(
|
|
66
|
+
const space = new static_space_1.StaticSpace(struct);
|
|
67
|
+
expect(space.lookup(fieldRef("t")).found).toBeInstanceOf(column_space_field_1.ColumnSpaceField);
|
|
64
68
|
const oField = space.structDef().fields[0];
|
|
65
69
|
expect(oField).toEqual(field);
|
|
66
70
|
});
|
|
@@ -71,8 +75,8 @@ describe("structdef comprehension", () => {
|
|
|
71
75
|
numberType: "integer",
|
|
72
76
|
};
|
|
73
77
|
const struct = mkStructDef(field);
|
|
74
|
-
const space = new
|
|
75
|
-
expect(space.lookup(fieldRef("t")).found).toBeInstanceOf(
|
|
78
|
+
const space = new static_space_1.StaticSpace(struct);
|
|
79
|
+
expect(space.lookup(fieldRef("t")).found).toBeInstanceOf(column_space_field_1.ColumnSpaceField);
|
|
76
80
|
const oField = space.structDef().fields[0];
|
|
77
81
|
expect(oField).toEqual(field);
|
|
78
82
|
});
|
|
@@ -82,8 +86,8 @@ describe("structdef comprehension", () => {
|
|
|
82
86
|
type: "boolean",
|
|
83
87
|
};
|
|
84
88
|
const struct = mkStructDef(field);
|
|
85
|
-
const space = new
|
|
86
|
-
expect(space.lookup(fieldRef("t")).found).toBeInstanceOf(
|
|
89
|
+
const space = new static_space_1.StaticSpace(struct);
|
|
90
|
+
expect(space.lookup(fieldRef("t")).found).toBeInstanceOf(column_space_field_1.ColumnSpaceField);
|
|
87
91
|
const oField = space.structDef().fields[0];
|
|
88
92
|
expect(oField).toEqual(field);
|
|
89
93
|
});
|
|
@@ -97,8 +101,8 @@ describe("structdef comprehension", () => {
|
|
|
97
101
|
fields: [{ type: "string", name: "b" }],
|
|
98
102
|
};
|
|
99
103
|
const struct = mkStructDef(field);
|
|
100
|
-
const space = new
|
|
101
|
-
expect(space.lookup(fieldRef("t.b")).found).toBeInstanceOf(
|
|
104
|
+
const space = new static_space_1.StaticSpace(struct);
|
|
105
|
+
expect(space.lookup(fieldRef("t.b")).found).toBeInstanceOf(column_space_field_1.ColumnSpaceField);
|
|
102
106
|
const oField = space.structDef().fields[0];
|
|
103
107
|
expect(oField).toEqual(field);
|
|
104
108
|
});
|
|
@@ -112,8 +116,8 @@ describe("structdef comprehension", () => {
|
|
|
112
116
|
fields: [{ type: "string", name: "a" }],
|
|
113
117
|
};
|
|
114
118
|
const struct = mkStructDef(field);
|
|
115
|
-
const space = new
|
|
116
|
-
expect(space.lookup(fieldRef("t.a")).found).toBeInstanceOf(
|
|
119
|
+
const space = new static_space_1.StaticSpace(struct);
|
|
120
|
+
expect(space.lookup(fieldRef("t.a")).found).toBeInstanceOf(column_space_field_1.ColumnSpaceField);
|
|
117
121
|
const oField = space.structDef().fields[0];
|
|
118
122
|
expect(oField).toEqual(field);
|
|
119
123
|
});
|
|
@@ -134,8 +138,8 @@ describe("structdef comprehension", () => {
|
|
|
134
138
|
fields: [{ type: "string", name: "a" }],
|
|
135
139
|
};
|
|
136
140
|
const struct = mkStructDef(field);
|
|
137
|
-
const space = new
|
|
138
|
-
expect(space.lookup(fieldRef("t.a")).found).toBeInstanceOf(
|
|
141
|
+
const space = new static_space_1.StaticSpace(struct);
|
|
142
|
+
expect(space.lookup(fieldRef("t.a")).found).toBeInstanceOf(column_space_field_1.ColumnSpaceField);
|
|
139
143
|
const oField = space.structDef().fields[0];
|
|
140
144
|
expect(oField).toEqual(field);
|
|
141
145
|
});
|
|
@@ -151,8 +155,8 @@ describe("structdef comprehension", () => {
|
|
|
151
155
|
],
|
|
152
156
|
};
|
|
153
157
|
const struct = mkStructDef(field);
|
|
154
|
-
const space = new
|
|
155
|
-
expect(space.lookup(fieldRef("t")).found).toBeInstanceOf(
|
|
158
|
+
const space = new static_space_1.StaticSpace(struct);
|
|
159
|
+
expect(space.lookup(fieldRef("t")).found).toBeInstanceOf(query_field_struct_1.QueryFieldStruct);
|
|
156
160
|
const oField = space.structDef().fields[0];
|
|
157
161
|
expect(oField).toEqual(field);
|
|
158
162
|
});
|
|
@@ -172,9 +176,9 @@ describe("structdef comprehension", () => {
|
|
|
172
176
|
constant: false,
|
|
173
177
|
},
|
|
174
178
|
};
|
|
175
|
-
const space = new
|
|
176
|
-
expect(space.lookup(fieldRef("cReqStr")).found).toBeInstanceOf(
|
|
177
|
-
expect(space.lookup(fieldRef("cOptStr")).found).toBeInstanceOf(
|
|
179
|
+
const space = new static_space_1.StaticSpace(struct);
|
|
180
|
+
expect(space.lookup(fieldRef("cReqStr")).found).toBeInstanceOf(defined_parameter_1.DefinedParameter);
|
|
181
|
+
expect(space.lookup(fieldRef("cOptStr")).found).toBeInstanceOf(defined_parameter_1.DefinedParameter);
|
|
178
182
|
});
|
|
179
183
|
});
|
|
180
184
|
//# sourceMappingURL=field-symbols.spec.js.map
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
const model_1 = require("../../model");
|
|
27
27
|
const sql_block_1 = require("../../model/sql_block");
|
|
28
|
-
const
|
|
28
|
+
const static_space_1 = require("../ast/static-space");
|
|
29
|
+
const expression_def_1 = require("../ast/types/expression-def");
|
|
29
30
|
const test_translator_1 = require("./test-translator");
|
|
30
31
|
const lodash_1 = require("lodash");
|
|
31
32
|
const util_1 = require("util");
|
|
@@ -297,10 +298,10 @@ class BetaExpression extends Testable {
|
|
|
297
298
|
}
|
|
298
299
|
compile() {
|
|
299
300
|
const exprAst = this.ast();
|
|
300
|
-
if (exprAst instanceof
|
|
301
|
+
if (exprAst instanceof expression_def_1.ExpressionDef) {
|
|
301
302
|
const aStruct = this.internalModel.contents.ab;
|
|
302
303
|
if (aStruct.type === "struct") {
|
|
303
|
-
const tstFS = new
|
|
304
|
+
const tstFS = new static_space_1.StaticSpace(aStruct);
|
|
304
305
|
const exprDef = exprAst.getExpression(tstFS);
|
|
305
306
|
if (inspectCompile) {
|
|
306
307
|
console.log("EXPRESSION: ", (0, test_translator_1.pretty)(exprDef));
|