@malloydata/malloy 0.0.24-dev230224184907 → 0.0.24-dev230228224434
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/connection_utils.js +10 -10
- package/dist/dialect/dialect.d.ts +2 -2
- package/dist/dialect/dialect.js +13 -13
- package/dist/dialect/dialect_map.d.ts +1 -1
- package/dist/dialect/duckdb.d.ts +3 -3
- package/dist/dialect/duckdb.js +44 -44
- package/dist/dialect/index.d.ts +6 -6
- package/dist/dialect/postgres.d.ts +3 -3
- package/dist/dialect/postgres.js +46 -46
- package/dist/dialect/standardsql.d.ts +4 -4
- package/dist/dialect/standardsql.js +51 -51
- package/dist/index.d.ts +10 -10
- package/dist/lang/ast/ast-utils.d.ts +1 -1
- package/dist/lang/ast/ast-utils.js +3 -3
- package/dist/lang/ast/elements/define-query.d.ts +3 -3
- package/dist/lang/ast/elements/define-query.js +6 -6
- package/dist/lang/ast/elements/define-source.d.ts +4 -4
- package/dist/lang/ast/elements/define-source.js +8 -8
- package/dist/lang/ast/elements/import-statement.d.ts +2 -2
- package/dist/lang/ast/elements/import-statement.js +7 -7
- package/dist/lang/ast/elements/pipeline-desc.d.ts +5 -5
- package/dist/lang/ast/elements/pipeline-desc.js +11 -11
- package/dist/lang/ast/elements/refined-source.d.ts +4 -4
- package/dist/lang/ast/elements/refined-source.js +6 -6
- package/dist/lang/ast/elements/source.d.ts +3 -3
- package/dist/lang/ast/elements/source.js +1 -1
- package/dist/lang/ast/error-factory.d.ts +1 -1
- package/dist/lang/ast/error-factory.js +15 -15
- package/dist/lang/ast/executors/index-executor.d.ts +7 -7
- package/dist/lang/ast/executors/index-executor.js +4 -4
- package/dist/lang/ast/executors/project-executor.d.ts +5 -5
- package/dist/lang/ast/executors/project-executor.js +2 -2
- package/dist/lang/ast/executors/reduce-executor.d.ts +8 -8
- package/dist/lang/ast/executors/reduce-executor.js +5 -5
- package/dist/lang/ast/expressions/apply.d.ts +2 -2
- package/dist/lang/ast/expressions/apply.js +1 -1
- package/dist/lang/ast/expressions/binary-boolean.d.ts +3 -3
- package/dist/lang/ast/expressions/binary-boolean.js +6 -6
- package/dist/lang/ast/expressions/binary-numeric.d.ts +3 -3
- package/dist/lang/ast/expressions/binary-numeric.js +2 -2
- package/dist/lang/ast/expressions/boolean.d.ts +4 -4
- package/dist/lang/ast/expressions/boolean.js +2 -2
- package/dist/lang/ast/expressions/constant-sub-expression.d.ts +4 -4
- package/dist/lang/ast/expressions/constant-sub-expression.js +12 -12
- package/dist/lang/ast/expressions/expr-add-sub.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-add-sub.js +1 -1
- package/dist/lang/ast/expressions/expr-aggregate-function.d.ts +5 -5
- package/dist/lang/ast/expressions/expr-aggregate-function.js +15 -15
- package/dist/lang/ast/expressions/expr-alternation-tree.d.ts +6 -6
- package/dist/lang/ast/expressions/expr-alternation-tree.js +6 -6
- package/dist/lang/ast/expressions/expr-asymmetric.d.ts +5 -5
- package/dist/lang/ast/expressions/expr-asymmetric.js +3 -3
- package/dist/lang/ast/expressions/expr-avg.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-avg.js +2 -2
- package/dist/lang/ast/expressions/expr-cast.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-cast.js +6 -6
- package/dist/lang/ast/expressions/expr-compare.d.ts +5 -5
- package/dist/lang/ast/expressions/expr-compare.js +9 -9
- package/dist/lang/ast/expressions/expr-count-distinct.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-count-distinct.js +1 -1
- package/dist/lang/ast/expressions/expr-count.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-count.js +10 -10
- package/dist/lang/ast/expressions/expr-filter.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-filter.js +13 -13
- package/dist/lang/ast/expressions/expr-func.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-func.js +8 -8
- package/dist/lang/ast/expressions/expr-granular-time.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-granular-time.js +17 -17
- package/dist/lang/ast/expressions/expr-id-reference.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-id-reference.js +11 -11
- package/dist/lang/ast/expressions/expr-logical-op.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-logical-op.js +1 -1
- package/dist/lang/ast/expressions/expr-max.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-max.js +1 -1
- package/dist/lang/ast/expressions/expr-min.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-min.js +1 -1
- package/dist/lang/ast/expressions/expr-minus.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-minus.js +5 -5
- package/dist/lang/ast/expressions/expr-mul-div.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-mul-div.js +1 -1
- package/dist/lang/ast/expressions/expr-not.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-not.js +3 -3
- package/dist/lang/ast/expressions/expr-now.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-now.js +8 -8
- package/dist/lang/ast/expressions/expr-null.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-null.js +4 -4
- package/dist/lang/ast/expressions/expr-number.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-number.js +2 -2
- package/dist/lang/ast/expressions/expr-parens.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-parens.js +3 -3
- package/dist/lang/ast/expressions/expr-regex.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-regex.js +4 -4
- package/dist/lang/ast/expressions/expr-string.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-string.js +8 -8
- package/dist/lang/ast/expressions/expr-sum.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-sum.js +2 -2
- package/dist/lang/ast/expressions/expr-time-extract.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-time-extract.js +30 -30
- package/dist/lang/ast/expressions/expr-time.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-time.js +10 -10
- package/dist/lang/ast/expressions/expr-ungroup.d.ts +6 -6
- package/dist/lang/ast/expressions/expr-ungroup.js +13 -13
- package/dist/lang/ast/expressions/for-range.d.ts +4 -4
- package/dist/lang/ast/expressions/for-range.js +17 -17
- package/dist/lang/ast/expressions/granular-literal.d.ts +4 -4
- package/dist/lang/ast/expressions/granular-literal.js +34 -34
- package/dist/lang/ast/expressions/partial-compare.d.ts +4 -4
- package/dist/lang/ast/expressions/partial-compare.js +4 -4
- package/dist/lang/ast/expressions/pick-when.d.ts +4 -4
- package/dist/lang/ast/expressions/pick-when.js +32 -32
- package/dist/lang/ast/expressions/range.d.ts +3 -3
- package/dist/lang/ast/expressions/range.js +20 -20
- package/dist/lang/ast/expressions/time-frame.d.ts +2 -2
- package/dist/lang/ast/expressions/time-frame.js +3 -3
- package/dist/lang/ast/expressions/top-by.d.ts +4 -4
- package/dist/lang/ast/expressions/top-by.js +5 -5
- package/dist/lang/ast/expressions/unary.d.ts +1 -1
- package/dist/lang/ast/expressions/unary.js +1 -1
- package/dist/lang/ast/expressions/utils.d.ts +2 -2
- package/dist/lang/ast/expressions/utils.js +6 -6
- package/dist/lang/ast/field-space/column-space-field.d.ts +3 -3
- package/dist/lang/ast/field-space/dynamic-space.d.ts +7 -7
- package/dist/lang/ast/field-space/dynamic-space.js +2 -2
- package/dist/lang/ast/field-space/field-definition-value.d.ts +5 -5
- package/dist/lang/ast/field-space/index-field-space.d.ts +3 -3
- package/dist/lang/ast/field-space/index-field-space.js +4 -4
- package/dist/lang/ast/field-space/join-space-field.d.ts +3 -3
- package/dist/lang/ast/field-space/project-field-space.d.ts +2 -2
- package/dist/lang/ast/field-space/project-field-space.js +5 -5
- package/dist/lang/ast/field-space/query-field-struct.d.ts +3 -3
- package/dist/lang/ast/field-space/query-field-struct.js +1 -1
- package/dist/lang/ast/field-space/query-space-field.d.ts +4 -4
- package/dist/lang/ast/field-space/query-space-field.js +1 -1
- package/dist/lang/ast/field-space/query-spaces.d.ts +11 -11
- package/dist/lang/ast/field-space/query-spaces.js +8 -8
- package/dist/lang/ast/field-space/reference-field.d.ts +5 -5
- package/dist/lang/ast/field-space/reference-field.js +1 -1
- package/dist/lang/ast/field-space/refined-space.d.ts +4 -4
- package/dist/lang/ast/field-space/refined-space.js +2 -2
- package/dist/lang/ast/field-space/rename-space-field.d.ts +3 -3
- package/dist/lang/ast/field-space/rename-space-field.js +2 -2
- package/dist/lang/ast/field-space/static-space.d.ts +7 -7
- package/dist/lang/ast/field-space/static-space.js +12 -12
- package/dist/lang/ast/field-space/struct-space-field-base.d.ts +4 -4
- package/dist/lang/ast/field-space/struct-space-field-base.js +1 -1
- package/dist/lang/ast/field-space/wild-space-field.d.ts +4 -4
- package/dist/lang/ast/field-space/wild-space-field.js +1 -1
- package/dist/lang/ast/fragtype-utils.d.ts +1 -1
- package/dist/lang/ast/fragtype-utils.js +15 -15
- package/dist/lang/ast/index.d.ts +90 -90
- package/dist/lang/ast/parameters/constant-parameter.d.ts +3 -3
- package/dist/lang/ast/parameters/constant-parameter.js +10 -10
- package/dist/lang/ast/parameters/has-parameter.d.ts +3 -3
- package/dist/lang/ast/parameters/has-parameter.js +7 -7
- package/dist/lang/ast/query-elements/anonymous-query.d.ts +3 -3
- package/dist/lang/ast/query-elements/anonymous-query.js +2 -2
- package/dist/lang/ast/query-elements/existing-query.d.ts +4 -4
- package/dist/lang/ast/query-elements/existing-query.js +10 -10
- package/dist/lang/ast/query-elements/full-query.d.ts +4 -4
- package/dist/lang/ast/query-elements/full-query.js +10 -10
- package/dist/lang/ast/query-elements/query-head-struct.d.ts +2 -2
- package/dist/lang/ast/query-elements/query-head-struct.js +2 -2
- package/dist/lang/ast/query-items/field-declaration.d.ts +6 -6
- package/dist/lang/ast/query-items/field-declaration.js +14 -14
- package/dist/lang/ast/query-items/field-references.d.ts +6 -6
- package/dist/lang/ast/query-items/field-references.js +9 -9
- package/dist/lang/ast/query-properties/aggregate.d.ts +2 -2
- package/dist/lang/ast/query-properties/aggregate.js +1 -1
- package/dist/lang/ast/query-properties/declare-fields.d.ts +2 -2
- package/dist/lang/ast/query-properties/declare-fields.js +1 -1
- package/dist/lang/ast/query-properties/dimmensions.d.ts +2 -2
- package/dist/lang/ast/query-properties/dimmensions.js +1 -1
- package/dist/lang/ast/query-properties/filters.d.ts +4 -4
- package/dist/lang/ast/query-properties/filters.js +16 -16
- package/dist/lang/ast/query-properties/group-by.d.ts +2 -2
- package/dist/lang/ast/query-properties/group-by.js +1 -1
- package/dist/lang/ast/query-properties/indexing.d.ts +3 -3
- package/dist/lang/ast/query-properties/indexing.js +3 -3
- package/dist/lang/ast/query-properties/joins.d.ts +6 -6
- package/dist/lang/ast/query-properties/joins.js +27 -27
- package/dist/lang/ast/query-properties/limit.d.ts +1 -1
- package/dist/lang/ast/query-properties/limit.js +1 -1
- package/dist/lang/ast/query-properties/measures.d.ts +2 -2
- package/dist/lang/ast/query-properties/measures.js +1 -1
- package/dist/lang/ast/query-properties/nest-reference.d.ts +2 -2
- package/dist/lang/ast/query-properties/nest-reference.js +1 -1
- package/dist/lang/ast/query-properties/nest.d.ts +7 -7
- package/dist/lang/ast/query-properties/nest.js +7 -7
- package/dist/lang/ast/query-properties/nests.d.ts +2 -2
- package/dist/lang/ast/query-properties/nests.js +1 -1
- package/dist/lang/ast/query-properties/ordering.d.ts +3 -3
- package/dist/lang/ast/query-properties/ordering.js +6 -6
- package/dist/lang/ast/query-properties/project-statement.d.ts +2 -2
- package/dist/lang/ast/query-properties/project-statement.js +1 -1
- package/dist/lang/ast/query-properties/qop-desc.d.ts +7 -7
- package/dist/lang/ast/query-properties/qop-desc.js +20 -20
- package/dist/lang/ast/query-properties/sampling.d.ts +2 -2
- package/dist/lang/ast/query-properties/sampling.js +1 -1
- package/dist/lang/ast/query-properties/top.d.ts +4 -4
- package/dist/lang/ast/query-properties/top.js +5 -5
- package/dist/lang/ast/source-properties/field-list-edit.d.ts +4 -4
- package/dist/lang/ast/source-properties/field-list-edit.js +2 -2
- package/dist/lang/ast/source-properties/primary-key.d.ts +2 -2
- package/dist/lang/ast/source-properties/primary-key.js +2 -2
- package/dist/lang/ast/source-properties/renames.d.ts +2 -2
- package/dist/lang/ast/source-properties/renames.js +3 -3
- package/dist/lang/ast/source-properties/turtles.d.ts +2 -2
- package/dist/lang/ast/source-properties/turtles.js +1 -1
- package/dist/lang/ast/sources/named-source.d.ts +4 -4
- package/dist/lang/ast/sources/named-source.js +5 -5
- package/dist/lang/ast/sources/query-source.d.ts +3 -3
- package/dist/lang/ast/sources/query-source.js +3 -3
- package/dist/lang/ast/sources/sql-source.d.ts +2 -2
- package/dist/lang/ast/sources/sql-source.js +2 -2
- package/dist/lang/ast/sources/table-source.d.ts +2 -2
- package/dist/lang/ast/sources/table-source.js +7 -7
- package/dist/lang/ast/space-seed.d.ts +2 -2
- package/dist/lang/ast/space-seed.js +1 -1
- package/dist/lang/ast/sql-elements/sql-statement.d.ts +4 -4
- package/dist/lang/ast/sql-elements/sql-statement.js +9 -9
- package/dist/lang/ast/sql-elements/sql-string.d.ts +3 -3
- package/dist/lang/ast/sql-elements/sql-string.js +6 -6
- package/dist/lang/ast/struct-utils.d.ts +2 -2
- package/dist/lang/ast/struct-utils.js +3 -3
- package/dist/lang/ast/time-utils.d.ts +6 -6
- package/dist/lang/ast/time-utils.js +46 -46
- package/dist/lang/ast/types/document-compile-result.d.ts +2 -2
- package/dist/lang/ast/types/executor.d.ts +3 -3
- package/dist/lang/ast/types/explore-desc.d.ts +2 -2
- package/dist/lang/ast/types/explore-desc.js +1 -1
- package/dist/lang/ast/types/explore-field.d.ts +3 -3
- package/dist/lang/ast/types/expr-result.d.ts +2 -2
- package/dist/lang/ast/types/expr-value.d.ts +2 -2
- package/dist/lang/ast/types/expression-def.d.ts +4 -4
- package/dist/lang/ast/types/expression-def.js +86 -86
- package/dist/lang/ast/types/field-collection-member.d.ts +3 -3
- package/dist/lang/ast/types/field-decl.d.ts +5 -5
- package/dist/lang/ast/types/field-space.d.ts +5 -5
- package/dist/lang/ast/types/field-space.js +1 -1
- package/dist/lang/ast/types/granular-result.d.ts +3 -3
- package/dist/lang/ast/types/granular-result.js +1 -1
- package/dist/lang/ast/types/lookup-result.d.ts +1 -1
- package/dist/lang/ast/types/malloy-element.d.ts +6 -6
- package/dist/lang/ast/types/malloy-element.js +49 -49
- package/dist/lang/ast/types/model-entry.d.ts +1 -1
- package/dist/lang/ast/types/name-space.d.ts +1 -1
- package/dist/lang/ast/types/nested-query.d.ts +2 -2
- package/dist/lang/ast/types/op-desc.d.ts +2 -2
- package/dist/lang/ast/types/query-comp.d.ts +1 -1
- package/dist/lang/ast/types/query-element.d.ts +3 -3
- package/dist/lang/ast/types/query-item.d.ts +4 -4
- package/dist/lang/ast/types/query-property.d.ts +15 -15
- package/dist/lang/ast/types/source-property.d.ts +8 -8
- package/dist/lang/ast/types/space-entry.d.ts +2 -2
- package/dist/lang/ast/types/space-field.d.ts +4 -4
- package/dist/lang/ast/types/space-field.js +4 -4
- package/dist/lang/ast/types/space-param.d.ts +4 -4
- package/dist/lang/ast/types/space-param.js +4 -4
- package/dist/lang/ast/types/time-result.d.ts +2 -2
- package/dist/lang/ast/types/turtle-headed-pipe.d.ts +2 -2
- package/dist/lang/ast/types/turtle-headed-pipe.js +1 -1
- package/dist/lang/ast/types/type-desc.d.ts +3 -3
- package/dist/lang/field-utils.d.ts +1 -1
- package/dist/lang/field-utils.js +4 -4
- package/dist/lang/index.d.ts +10 -10
- package/dist/lang/malloy-to-ast.d.ts +8 -8
- package/dist/lang/malloy-to-ast.js +68 -68
- package/dist/lang/parse-error-handler.d.ts +3 -3
- package/dist/lang/parse-error-handler.js +4 -4
- package/dist/lang/parse-log.d.ts +2 -2
- package/dist/lang/parse-log.js +1 -1
- package/dist/lang/parse-malloy.d.ts +7 -7
- package/dist/lang/parse-malloy.js +81 -81
- package/dist/lang/parse-tree-walkers/document-completion-walker.d.ts +2 -2
- package/dist/lang/parse-tree-walkers/document-completion-walker.js +38 -38
- package/dist/lang/parse-tree-walkers/document-help-context-walker.d.ts +1 -1
- package/dist/lang/parse-tree-walkers/document-help-context-walker.js +14 -14
- package/dist/lang/parse-tree-walkers/document-highlight-walker.d.ts +3 -3
- package/dist/lang/parse-tree-walkers/document-highlight-walker.js +85 -85
- package/dist/lang/parse-tree-walkers/document-symbol-walker.d.ts +4 -4
- package/dist/lang/parse-tree-walkers/document-symbol-walker.js +40 -40
- package/dist/lang/parse-tree-walkers/explore-query-walker.d.ts +3 -3
- package/dist/lang/parse-tree-walkers/explore-query-walker.js +3 -3
- package/dist/lang/parse-tree-walkers/find-external-references.d.ts +4 -4
- package/dist/lang/parse-tree-walkers/find-external-references.js +2 -2
- package/dist/lang/reference-list.d.ts +1 -1
- package/dist/lang/test/document-help-context-walker.spec.js +9 -9
- package/dist/lang/test/document-symbol-walker.spec.js +32 -32
- package/dist/lang/test/field-symbols.spec.js +87 -87
- package/dist/lang/test/parse.spec.d.ts +1 -1
- package/dist/lang/test/parse.spec.js +768 -768
- package/dist/lang/test/test-translator.d.ts +6 -6
- package/dist/lang/test/test-translator.js +159 -159
- package/dist/lang/translate-response.d.ts +7 -7
- package/dist/lang/translate-response.js +1 -1
- package/dist/lang/zone.d.ts +5 -5
- package/dist/lang/zone.js +8 -8
- package/dist/malloy.d.ts +7 -7
- package/dist/malloy.js +192 -192
- package/dist/model/index.d.ts +2 -2
- package/dist/model/malloy_query.d.ts +12 -12
- package/dist/model/malloy_query.js +497 -502
- package/dist/model/malloy_types.d.ts +68 -68
- package/dist/model/malloy_types.js +102 -102
- package/dist/model/sql_block.d.ts +1 -1
- package/dist/model/sql_block.js +4 -4
- package/dist/model/utils.d.ts +1 -1
- package/dist/model/utils.js +10 -10
- package/dist/runtime_types.d.ts +2 -2
- package/package.json +4 -1
|
@@ -26,11 +26,11 @@ exports.FieldReferences = exports.WildcardFieldReference = exports.FieldReferenc
|
|
|
26
26
|
const malloy_element_1 = require("../types/malloy-element");
|
|
27
27
|
class FieldReference extends malloy_element_1.ListOf {
|
|
28
28
|
constructor(names) {
|
|
29
|
-
super(
|
|
30
|
-
this.elementType =
|
|
29
|
+
super('fieldReference', names);
|
|
30
|
+
this.elementType = 'fieldReference';
|
|
31
31
|
}
|
|
32
32
|
get refString() {
|
|
33
|
-
return this.list.map(
|
|
33
|
+
return this.list.map(n => n.refString).join('.');
|
|
34
34
|
}
|
|
35
35
|
get outputName() {
|
|
36
36
|
const last = this.list[this.list.length - 1];
|
|
@@ -40,8 +40,8 @@ class FieldReference extends malloy_element_1.ListOf {
|
|
|
40
40
|
if (this.list.length > 1) {
|
|
41
41
|
return this.list
|
|
42
42
|
.slice(0, -1)
|
|
43
|
-
.map(
|
|
44
|
-
.join(
|
|
43
|
+
.map(n => n.refString)
|
|
44
|
+
.join('.');
|
|
45
45
|
}
|
|
46
46
|
return undefined;
|
|
47
47
|
}
|
|
@@ -58,11 +58,11 @@ class WildcardFieldReference extends malloy_element_1.MalloyElement {
|
|
|
58
58
|
super();
|
|
59
59
|
this.joinPath = joinPath;
|
|
60
60
|
this.star = star;
|
|
61
|
-
this.elementType =
|
|
62
|
-
this.has({
|
|
61
|
+
this.elementType = 'wildcardFieldReference';
|
|
62
|
+
this.has({ joinPath: joinPath });
|
|
63
63
|
}
|
|
64
64
|
getFieldDef() {
|
|
65
|
-
throw this.internalError(
|
|
65
|
+
throw this.internalError('fielddef request from wildcard reference');
|
|
66
66
|
}
|
|
67
67
|
get refString() {
|
|
68
68
|
return this.joinPath
|
|
@@ -73,7 +73,7 @@ class WildcardFieldReference extends malloy_element_1.MalloyElement {
|
|
|
73
73
|
exports.WildcardFieldReference = WildcardFieldReference;
|
|
74
74
|
class FieldReferences extends malloy_element_1.ListOf {
|
|
75
75
|
constructor(members) {
|
|
76
|
-
super(
|
|
76
|
+
super('fieldReferenceList', members);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
exports.FieldReferences = FieldReferences;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ListOf } from
|
|
2
|
-
import { QueryItem } from
|
|
1
|
+
import { ListOf } from '../types/malloy-element';
|
|
2
|
+
import { QueryItem } from '../types/query-item';
|
|
3
3
|
export declare class Aggregate extends ListOf<QueryItem> {
|
|
4
4
|
constructor(members: QueryItem[]);
|
|
5
5
|
}
|
|
@@ -27,7 +27,7 @@ const field_declaration_1 = require("../query-items/field-declaration");
|
|
|
27
27
|
const malloy_element_1 = require("../types/malloy-element");
|
|
28
28
|
class Aggregate extends malloy_element_1.ListOf {
|
|
29
29
|
constructor(members) {
|
|
30
|
-
super(
|
|
30
|
+
super('aggregate', members);
|
|
31
31
|
for (const el of members) {
|
|
32
32
|
if (el instanceof field_declaration_1.FieldDeclaration) {
|
|
33
33
|
el.isMeasure = true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FieldDeclaration } from
|
|
2
|
-
import { ListOf } from
|
|
1
|
+
import { FieldDeclaration } from '../query-items/field-declaration';
|
|
2
|
+
import { ListOf } from '../types/malloy-element';
|
|
3
3
|
export declare class DeclareFields extends ListOf<FieldDeclaration> {
|
|
4
4
|
constructor(fields: FieldDeclaration[], fieldType?: string);
|
|
5
5
|
}
|
|
@@ -25,7 +25,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
exports.DeclareFields = void 0;
|
|
26
26
|
const malloy_element_1 = require("../types/malloy-element");
|
|
27
27
|
class DeclareFields extends malloy_element_1.ListOf {
|
|
28
|
-
constructor(fields, fieldType =
|
|
28
|
+
constructor(fields, fieldType = 'declare') {
|
|
29
29
|
super(fieldType, fields);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FieldDeclaration } from
|
|
2
|
-
import { DeclareFields } from
|
|
1
|
+
import { FieldDeclaration } from '../query-items/field-declaration';
|
|
2
|
+
import { DeclareFields } from './declare-fields';
|
|
3
3
|
export declare class Dimensions extends DeclareFields {
|
|
4
4
|
constructor(dimensions: FieldDeclaration[]);
|
|
5
5
|
}
|
|
@@ -26,7 +26,7 @@ exports.Dimensions = void 0;
|
|
|
26
26
|
const declare_fields_1 = require("./declare-fields");
|
|
27
27
|
class Dimensions extends declare_fields_1.DeclareFields {
|
|
28
28
|
constructor(dimensions) {
|
|
29
|
-
super(dimensions,
|
|
29
|
+
super(dimensions, 'dimension');
|
|
30
30
|
for (const dim of dimensions) {
|
|
31
31
|
dim.isMeasure = false;
|
|
32
32
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FilterExpression } from
|
|
2
|
-
import { ExpressionDef } from
|
|
3
|
-
import { FieldSpace } from
|
|
4
|
-
import { ListOf, MalloyElement } from
|
|
1
|
+
import { FilterExpression } from '../../../model/malloy_types';
|
|
2
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
3
|
+
import { FieldSpace } from '../types/field-space';
|
|
4
|
+
import { ListOf, MalloyElement } from '../types/malloy-element';
|
|
5
5
|
export declare class FilterElement extends MalloyElement {
|
|
6
6
|
readonly expr: ExpressionDef;
|
|
7
7
|
readonly exprSrc: string;
|
|
@@ -28,25 +28,25 @@ const utils_1 = require("../expressions/utils");
|
|
|
28
28
|
const malloy_element_1 = require("../types/malloy-element");
|
|
29
29
|
class FilterElement extends malloy_element_1.MalloyElement {
|
|
30
30
|
constructor(expr, exprSrc) {
|
|
31
|
-
super({
|
|
31
|
+
super({ expr: expr });
|
|
32
32
|
this.expr = expr;
|
|
33
33
|
this.exprSrc = exprSrc;
|
|
34
|
-
this.elementType =
|
|
34
|
+
this.elementType = 'filterElement';
|
|
35
35
|
}
|
|
36
36
|
filterExpression(fs) {
|
|
37
37
|
const exprVal = this.expr.getExpression(fs);
|
|
38
|
-
if (exprVal.dataType !==
|
|
39
|
-
this.expr.log(
|
|
38
|
+
if (exprVal.dataType !== 'boolean') {
|
|
39
|
+
this.expr.log('Filter expression must have boolean value');
|
|
40
40
|
return {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
code: this.exprSrc,
|
|
42
|
+
expression: ['_FILTER_MUST_RETURN_BOOLEAN_'],
|
|
43
|
+
expressionType: 'scalar',
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
const exprCond = {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
code: this.exprSrc,
|
|
48
|
+
expression: (0, utils_1.compressExpr)(exprVal.value),
|
|
49
|
+
expressionType: exprVal.expressionType,
|
|
50
50
|
};
|
|
51
51
|
return exprCond;
|
|
52
52
|
}
|
|
@@ -54,11 +54,11 @@ class FilterElement extends malloy_element_1.MalloyElement {
|
|
|
54
54
|
exports.FilterElement = FilterElement;
|
|
55
55
|
class Filter extends malloy_element_1.ListOf {
|
|
56
56
|
constructor(elements = []) {
|
|
57
|
-
super(
|
|
58
|
-
this.elementType =
|
|
57
|
+
super('filterElements', elements);
|
|
58
|
+
this.elementType = 'filter';
|
|
59
59
|
}
|
|
60
60
|
set having(isHaving) {
|
|
61
|
-
this.elementType = isHaving ?
|
|
61
|
+
this.elementType = isHaving ? 'having' : 'where';
|
|
62
62
|
}
|
|
63
63
|
getFilterList(fs) {
|
|
64
64
|
const checked = [];
|
|
@@ -69,13 +69,13 @@ class Filter extends malloy_element_1.ListOf {
|
|
|
69
69
|
if (this.havingClause !== undefined) {
|
|
70
70
|
if (this.havingClause) {
|
|
71
71
|
if ((0, malloy_types_1.expressionIsCalculation)(fExpr.expressionType)) {
|
|
72
|
-
oneElement.log(
|
|
72
|
+
oneElement.log('Aggregate or Analytical expression expected in HAVING filter');
|
|
73
73
|
continue;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
|
-
if (fExpr.expressionType !==
|
|
78
|
-
oneElement.log(
|
|
77
|
+
if (fExpr.expressionType !== 'scalar') {
|
|
78
|
+
oneElement.log('Aggregate or Analytical expressions not allowed in WHERE');
|
|
79
79
|
continue;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ListOf } from
|
|
2
|
-
import { QueryItem } from
|
|
1
|
+
import { ListOf } from '../types/malloy-element';
|
|
2
|
+
import { QueryItem } from '../types/query-item';
|
|
3
3
|
export declare class GroupBy extends ListOf<QueryItem> {
|
|
4
4
|
constructor(members: QueryItem[]);
|
|
5
5
|
}
|
|
@@ -27,7 +27,7 @@ const field_declaration_1 = require("../query-items/field-declaration");
|
|
|
27
27
|
const malloy_element_1 = require("../types/malloy-element");
|
|
28
28
|
class GroupBy extends malloy_element_1.ListOf {
|
|
29
29
|
constructor(members) {
|
|
30
|
-
super(
|
|
30
|
+
super('groupBy', members);
|
|
31
31
|
for (const el of members) {
|
|
32
32
|
if (el instanceof field_declaration_1.FieldDeclaration) {
|
|
33
33
|
el.isMeasure = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FieldReferences } from
|
|
2
|
-
import { FieldName } from
|
|
3
|
-
import { MalloyElement } from
|
|
1
|
+
import { FieldReferences } from '../query-items/field-references';
|
|
2
|
+
import { FieldName } from '../types/field-space';
|
|
3
|
+
import { MalloyElement } from '../types/malloy-element';
|
|
4
4
|
export declare class Index extends MalloyElement {
|
|
5
5
|
readonly fields: FieldReferences;
|
|
6
6
|
elementType: string;
|
|
@@ -26,12 +26,12 @@ exports.Index = void 0;
|
|
|
26
26
|
const malloy_element_1 = require("../types/malloy-element");
|
|
27
27
|
class Index extends malloy_element_1.MalloyElement {
|
|
28
28
|
constructor(fields) {
|
|
29
|
-
super({
|
|
29
|
+
super({ fields: fields });
|
|
30
30
|
this.fields = fields;
|
|
31
|
-
this.elementType =
|
|
31
|
+
this.elementType = 'index';
|
|
32
32
|
}
|
|
33
33
|
useWeight(fn) {
|
|
34
|
-
this.has({
|
|
34
|
+
this.has({ weightBy: fn });
|
|
35
35
|
this.weightBy = fn;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Expr, StructDef } from
|
|
2
|
-
import { Source } from
|
|
3
|
-
import { ExpressionDef } from
|
|
4
|
-
import { FieldSpace } from
|
|
5
|
-
import { ListOf, MalloyElement, ModelEntryReference } from
|
|
1
|
+
import { Expr, StructDef } from '../../../model/malloy_types';
|
|
2
|
+
import { Source } from '../elements/source';
|
|
3
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
4
|
+
import { FieldSpace } from '../types/field-space';
|
|
5
|
+
import { ListOf, MalloyElement, ModelEntryReference } from '../types/malloy-element';
|
|
6
6
|
export declare abstract class Join extends MalloyElement {
|
|
7
7
|
abstract name: ModelEntryReference;
|
|
8
8
|
abstract structDef(): StructDef;
|
|
@@ -17,7 +17,7 @@ export declare class KeyJoin extends Join {
|
|
|
17
17
|
structDef(): StructDef;
|
|
18
18
|
fixupJoinOn(outer: FieldSpace, inStruct: StructDef): void;
|
|
19
19
|
}
|
|
20
|
-
declare type ExpressionJoinType =
|
|
20
|
+
declare type ExpressionJoinType = 'many' | 'one' | 'cross';
|
|
21
21
|
export declare class ExpressionJoin extends Join {
|
|
22
22
|
readonly name: ModelEntryReference;
|
|
23
23
|
readonly source: Source;
|
|
@@ -31,23 +31,23 @@ class Join extends malloy_element_1.MalloyElement {
|
|
|
31
31
|
exports.Join = Join;
|
|
32
32
|
class KeyJoin extends Join {
|
|
33
33
|
constructor(name, source, keyExpr) {
|
|
34
|
-
super({
|
|
34
|
+
super({ name: name, source: source, keyExpr: keyExpr });
|
|
35
35
|
this.name = name;
|
|
36
36
|
this.source = source;
|
|
37
37
|
this.keyExpr = keyExpr;
|
|
38
|
-
this.elementType =
|
|
38
|
+
this.elementType = 'joinOnKey';
|
|
39
39
|
}
|
|
40
40
|
structDef() {
|
|
41
41
|
const sourceDef = this.source.structDef();
|
|
42
42
|
const joinStruct = {
|
|
43
43
|
...sourceDef,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
structRelationship: {
|
|
45
|
+
type: 'one',
|
|
46
|
+
onExpression: ["('join fixup'='not done yet')"],
|
|
47
47
|
},
|
|
48
|
-
|
|
48
|
+
location: this.location,
|
|
49
49
|
};
|
|
50
|
-
if (sourceDef.structSource.type ===
|
|
50
|
+
if (sourceDef.structSource.type === 'query') {
|
|
51
51
|
// the name from query does not need to be preserved
|
|
52
52
|
joinStruct.name = this.name.refString;
|
|
53
53
|
}
|
|
@@ -59,19 +59,19 @@ class KeyJoin extends Join {
|
|
|
59
59
|
fixupJoinOn(outer, inStruct) {
|
|
60
60
|
const exprX = this.keyExpr.getExpression(outer);
|
|
61
61
|
if (inStruct.primaryKey) {
|
|
62
|
-
const pkey = inStruct.fields.find(
|
|
62
|
+
const pkey = inStruct.fields.find(f => (f.as || f.name) === inStruct.primaryKey);
|
|
63
63
|
if (pkey) {
|
|
64
64
|
if (pkey.type === exprX.dataType) {
|
|
65
65
|
inStruct.structRelationship = {
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
type: 'one',
|
|
67
|
+
onExpression: [
|
|
68
68
|
{
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
type: 'field',
|
|
70
|
+
path: `${this.name}.${inStruct.primaryKey}`,
|
|
71
71
|
},
|
|
72
|
-
|
|
73
|
-
...exprX.value
|
|
74
|
-
]
|
|
72
|
+
'=',
|
|
73
|
+
...exprX.value,
|
|
74
|
+
],
|
|
75
75
|
};
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
@@ -84,33 +84,33 @@ class KeyJoin extends Join {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
else {
|
|
87
|
-
this.log(
|
|
87
|
+
this.log('join_one: Cannot use with unless source has a primary key');
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
exports.KeyJoin = KeyJoin;
|
|
92
92
|
class ExpressionJoin extends Join {
|
|
93
93
|
constructor(name, source) {
|
|
94
|
-
super({
|
|
94
|
+
super({ name: name, source: source });
|
|
95
95
|
this.name = name;
|
|
96
96
|
this.source = source;
|
|
97
|
-
this.elementType =
|
|
98
|
-
this.joinType =
|
|
97
|
+
this.elementType = 'joinOnExpr';
|
|
98
|
+
this.joinType = 'one';
|
|
99
99
|
}
|
|
100
100
|
set joinOn(joinExpr) {
|
|
101
101
|
this.expr = joinExpr;
|
|
102
|
-
this.has({
|
|
102
|
+
this.has({ on: joinExpr });
|
|
103
103
|
}
|
|
104
104
|
get joinOn() {
|
|
105
105
|
return this.expr;
|
|
106
106
|
}
|
|
107
107
|
fixupJoinOn(outer, inStruct) {
|
|
108
|
-
if (this.expr
|
|
108
|
+
if (this.expr === undefined) {
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
const exprX = this.expr.getExpression(outer);
|
|
112
|
-
if (exprX.dataType !==
|
|
113
|
-
this.log(
|
|
112
|
+
if (exprX.dataType !== 'boolean') {
|
|
113
|
+
this.log('join conditions must be boolean expressions');
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
const joinRel = inStruct.structRelationship;
|
|
@@ -122,10 +122,10 @@ class ExpressionJoin extends Join {
|
|
|
122
122
|
const sourceDef = this.source.structDef();
|
|
123
123
|
const joinStruct = {
|
|
124
124
|
...sourceDef,
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
structRelationship: { type: this.joinType },
|
|
126
|
+
location: this.location,
|
|
127
127
|
};
|
|
128
|
-
if (sourceDef.structSource.type ===
|
|
128
|
+
if (sourceDef.structSource.type === 'query') {
|
|
129
129
|
// the name from query does not need to be preserved
|
|
130
130
|
joinStruct.name = this.name.refString;
|
|
131
131
|
delete joinStruct.as;
|
|
@@ -139,7 +139,7 @@ class ExpressionJoin extends Join {
|
|
|
139
139
|
exports.ExpressionJoin = ExpressionJoin;
|
|
140
140
|
class Joins extends malloy_element_1.ListOf {
|
|
141
141
|
constructor(joins) {
|
|
142
|
-
super(
|
|
142
|
+
super('joinList', joins);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
exports.Joins = Joins;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FieldDeclaration } from
|
|
2
|
-
import { DeclareFields } from
|
|
1
|
+
import { FieldDeclaration } from '../query-items/field-declaration';
|
|
2
|
+
import { DeclareFields } from './declare-fields';
|
|
3
3
|
export declare class Measures extends DeclareFields {
|
|
4
4
|
constructor(measures: FieldDeclaration[]);
|
|
5
5
|
}
|
|
@@ -26,7 +26,7 @@ exports.Measures = void 0;
|
|
|
26
26
|
const declare_fields_1 = require("./declare-fields");
|
|
27
27
|
class Measures extends declare_fields_1.DeclareFields {
|
|
28
28
|
constructor(measures) {
|
|
29
|
-
super(measures,
|
|
29
|
+
super(measures, 'measure');
|
|
30
30
|
for (const dim of measures) {
|
|
31
31
|
dim.isMeasure = true;
|
|
32
32
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FieldReference } from
|
|
2
|
-
import { FieldName } from
|
|
1
|
+
import { FieldReference } from '../query-items/field-references';
|
|
2
|
+
import { FieldName } from '../types/field-space';
|
|
3
3
|
export declare class NestReference extends FieldReference {
|
|
4
4
|
readonly name: FieldName;
|
|
5
5
|
elementType: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as model from
|
|
2
|
-
import { NestedQuery } from
|
|
3
|
-
import { FieldName, FieldSpace } from
|
|
4
|
-
import { MalloyElement } from
|
|
5
|
-
import { QueryField } from
|
|
6
|
-
import { TurtleHeadedPipe } from
|
|
7
|
-
import { QueryInputSpace } from
|
|
1
|
+
import * as model from '../../../model/malloy_types';
|
|
2
|
+
import { NestedQuery } from '../types/nested-query';
|
|
3
|
+
import { FieldName, FieldSpace } from '../types/field-space';
|
|
4
|
+
import { MalloyElement } from '../types/malloy-element';
|
|
5
|
+
import { QueryField } from '../field-space/query-space-field';
|
|
6
|
+
import { TurtleHeadedPipe } from '../types/turtle-headed-pipe';
|
|
7
|
+
import { QueryInputSpace } from '../field-space/query-spaces';
|
|
8
8
|
export declare class TurtleDecl extends TurtleHeadedPipe {
|
|
9
9
|
readonly name: string;
|
|
10
10
|
constructor(name: string);
|
|
@@ -29,7 +29,7 @@ const struct_utils_1 = require("../struct-utils");
|
|
|
29
29
|
const turtle_headed_pipe_1 = require("../types/turtle-headed-pipe");
|
|
30
30
|
const static_space_1 = require("../field-space/static-space");
|
|
31
31
|
function isTurtle(fd) {
|
|
32
|
-
const ret = fd && typeof fd !==
|
|
32
|
+
const ret = fd && typeof fd !== 'string' && fd.type === 'turtle';
|
|
33
33
|
return !!ret;
|
|
34
34
|
}
|
|
35
35
|
class TurtleDecl extends turtle_headed_pipe_1.TurtleHeadedPipe {
|
|
@@ -38,7 +38,7 @@ class TurtleDecl extends turtle_headed_pipe_1.TurtleHeadedPipe {
|
|
|
38
38
|
this.name = name;
|
|
39
39
|
}
|
|
40
40
|
getPipeline(fs) {
|
|
41
|
-
const modelPipe = {
|
|
41
|
+
const modelPipe = { pipeline: [] };
|
|
42
42
|
if (this.turtleName) {
|
|
43
43
|
const headEnt = this.turtleName.getField(fs);
|
|
44
44
|
let reportWrongType = true;
|
|
@@ -79,10 +79,10 @@ class TurtleDecl extends turtle_headed_pipe_1.TurtleHeadedPipe {
|
|
|
79
79
|
}
|
|
80
80
|
const pipe = this.getPipeline(fs);
|
|
81
81
|
return {
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
type: 'turtle',
|
|
83
|
+
name: this.name,
|
|
84
84
|
...pipe,
|
|
85
|
-
|
|
85
|
+
location: this.location,
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -90,7 +90,7 @@ exports.TurtleDecl = TurtleDecl;
|
|
|
90
90
|
class NestRefinement extends TurtleDecl {
|
|
91
91
|
constructor(turtleName) {
|
|
92
92
|
super(turtleName.refString);
|
|
93
|
-
this.elementType =
|
|
93
|
+
this.elementType = 'nestRefinement';
|
|
94
94
|
this.turtleName = turtleName;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -98,7 +98,7 @@ exports.NestRefinement = NestRefinement;
|
|
|
98
98
|
class NestDefinition extends TurtleDecl {
|
|
99
99
|
constructor(name) {
|
|
100
100
|
super(name);
|
|
101
|
-
this.elementType =
|
|
101
|
+
this.elementType = 'nestDefinition';
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
exports.NestDefinition = NestDefinition;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ListOf } from
|
|
2
|
-
import { NestedQuery } from
|
|
1
|
+
import { ListOf } from '../types/malloy-element';
|
|
2
|
+
import { NestedQuery } from '../types/nested-query';
|
|
3
3
|
export declare class Nests extends ListOf<NestedQuery> {
|
|
4
4
|
constructor(nests: NestedQuery[]);
|
|
5
5
|
}
|
|
@@ -26,7 +26,7 @@ exports.Nests = void 0;
|
|
|
26
26
|
const malloy_element_1 = require("../types/malloy-element");
|
|
27
27
|
class Nests extends malloy_element_1.ListOf {
|
|
28
28
|
constructor(nests) {
|
|
29
|
-
super(
|
|
29
|
+
super('nestedQueries', nests);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.Nests = Nests;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OrderBy as ModelOrderBy } from
|
|
2
|
-
import { FieldName, FieldSpace } from
|
|
3
|
-
import { ListOf, MalloyElement } from
|
|
1
|
+
import { OrderBy as ModelOrderBy } from '../../../model/malloy_types';
|
|
2
|
+
import { FieldName, FieldSpace } from '../types/field-space';
|
|
3
|
+
import { ListOf, MalloyElement } from '../types/malloy-element';
|
|
4
4
|
export declare class OrderBy extends MalloyElement {
|
|
5
5
|
readonly field: number | FieldName;
|
|
6
6
|
readonly dir?: "asc" | "desc" | undefined;
|
|
@@ -30,13 +30,13 @@ class OrderBy extends malloy_element_1.MalloyElement {
|
|
|
30
30
|
super();
|
|
31
31
|
this.field = field;
|
|
32
32
|
this.dir = dir;
|
|
33
|
-
this.elementType =
|
|
33
|
+
this.elementType = 'orderBy';
|
|
34
34
|
if (field instanceof field_space_1.FieldName) {
|
|
35
|
-
this.has({
|
|
35
|
+
this.has({ field: field });
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
get modelField() {
|
|
39
|
-
return typeof this.field ===
|
|
39
|
+
return typeof this.field === 'number' ? this.field : this.field.refString;
|
|
40
40
|
}
|
|
41
41
|
getOrderBy(_fs) {
|
|
42
42
|
// TODO jump-to-definition `fs` cannot currently `lookup` fields in the output space
|
|
@@ -46,7 +46,7 @@ class OrderBy extends malloy_element_1.MalloyElement {
|
|
|
46
46
|
// this.field.log(entry.error);
|
|
47
47
|
// }
|
|
48
48
|
// }
|
|
49
|
-
const orderElement = {
|
|
49
|
+
const orderElement = { field: this.modelField };
|
|
50
50
|
if (this.dir) {
|
|
51
51
|
orderElement.dir = this.dir;
|
|
52
52
|
}
|
|
@@ -56,10 +56,10 @@ class OrderBy extends malloy_element_1.MalloyElement {
|
|
|
56
56
|
exports.OrderBy = OrderBy;
|
|
57
57
|
class Ordering extends malloy_element_1.ListOf {
|
|
58
58
|
constructor(list) {
|
|
59
|
-
super(
|
|
59
|
+
super('ordering', list);
|
|
60
60
|
}
|
|
61
61
|
getOrderBy(fs) {
|
|
62
|
-
return this.list.map(
|
|
62
|
+
return this.list.map(el => el.getOrderBy(fs));
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
exports.Ordering = Ordering;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FieldCollectionMember } from
|
|
2
|
-
import { ListOf } from
|
|
1
|
+
import { FieldCollectionMember } from '../types/field-collection-member';
|
|
2
|
+
import { ListOf } from '../types/malloy-element';
|
|
3
3
|
export declare class ProjectStatement extends ListOf<FieldCollectionMember> {
|
|
4
4
|
constructor(members: FieldCollectionMember[]);
|
|
5
5
|
}
|
|
@@ -26,7 +26,7 @@ exports.ProjectStatement = void 0;
|
|
|
26
26
|
const malloy_element_1 = require("../types/malloy-element");
|
|
27
27
|
class ProjectStatement extends malloy_element_1.ListOf {
|
|
28
28
|
constructor(members) {
|
|
29
|
-
super(
|
|
29
|
+
super('fieldCollection', members);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.ProjectStatement = ProjectStatement;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PipeSegment } from
|
|
2
|
-
import { FieldSpace } from
|
|
3
|
-
import { ListOf } from
|
|
4
|
-
import { OpDesc } from
|
|
5
|
-
import { PipelineDesc } from
|
|
6
|
-
import { QueryProperty } from
|
|
7
|
-
declare type QOPType =
|
|
1
|
+
import { PipeSegment } from '../../../model/malloy_types';
|
|
2
|
+
import { FieldSpace } from '../types/field-space';
|
|
3
|
+
import { ListOf } from '../types/malloy-element';
|
|
4
|
+
import { OpDesc } from '../types/op-desc';
|
|
5
|
+
import { PipelineDesc } from '../elements/pipeline-desc';
|
|
6
|
+
import { QueryProperty } from '../types/query-property';
|
|
7
|
+
declare type QOPType = 'grouping' | 'aggregate' | 'project' | 'index';
|
|
8
8
|
export declare class QOPDesc extends ListOf<QueryProperty> {
|
|
9
9
|
opType: QOPType;
|
|
10
10
|
private refineThis?;
|