@malloydata/malloy 0.0.24-dev230224214106 → 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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DocumentLocation, FieldDef, ModelDef, NamedModelObject, PipeSegment, Query, StructDef, TurtleDef } from
|
|
2
|
-
import { MalloyElement } from
|
|
3
|
-
import { NameSpace } from
|
|
4
|
-
import { ModelEntry } from
|
|
5
|
-
import { MalloyTranslator } from
|
|
6
|
-
import { TranslateResponse } from
|
|
1
|
+
import { DocumentLocation, FieldDef, ModelDef, NamedModelObject, PipeSegment, Query, StructDef, TurtleDef } from '../../model/malloy_types';
|
|
2
|
+
import { MalloyElement } from '../ast';
|
|
3
|
+
import { NameSpace } from '../ast/types/name-space';
|
|
4
|
+
import { ModelEntry } from '../ast/types/model-entry';
|
|
5
|
+
import { MalloyTranslator } from '../parse-malloy';
|
|
6
|
+
import { TranslateResponse } from '../translate-response';
|
|
7
7
|
export declare function pretty(thing: any): string;
|
|
8
8
|
export declare const aTableDef: StructDef;
|
|
9
9
|
/**
|
|
@@ -29,112 +29,112 @@ const ast_1 = require("../ast");
|
|
|
29
29
|
const parse_malloy_1 = require("../parse-malloy");
|
|
30
30
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/explicit-module-boundary-types
|
|
31
31
|
function pretty(thing) {
|
|
32
|
-
return (0, util_1.inspect)(thing, {
|
|
32
|
+
return (0, util_1.inspect)(thing, { breakLength: 72, depth: Infinity });
|
|
33
33
|
}
|
|
34
34
|
exports.pretty = pretty;
|
|
35
35
|
const mockSchema = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
{
|
|
45
|
-
{
|
|
46
|
-
{
|
|
47
|
-
{
|
|
48
|
-
{
|
|
49
|
-
{
|
|
50
|
-
{
|
|
51
|
-
]
|
|
36
|
+
aTable: {
|
|
37
|
+
type: 'struct',
|
|
38
|
+
name: 'aTable',
|
|
39
|
+
dialect: 'standardsql',
|
|
40
|
+
structSource: { type: 'table', tablePath: 'aTable' },
|
|
41
|
+
structRelationship: { type: 'basetable', connectionName: 'test' },
|
|
42
|
+
fields: [
|
|
43
|
+
{ type: 'string', name: 'astr' },
|
|
44
|
+
{ type: 'number', name: 'af', numberType: 'float' },
|
|
45
|
+
{ type: 'number', name: 'ai', numberType: 'integer' },
|
|
46
|
+
{ type: 'date', name: 'ad' },
|
|
47
|
+
{ type: 'boolean', name: 'abool' },
|
|
48
|
+
{ type: 'timestamp', name: 'ats' },
|
|
49
|
+
{ type: 'unsupported', name: 'aun' },
|
|
50
|
+
{ type: 'unsupported', name: 'aweird', rawType: 'weird' },
|
|
51
|
+
],
|
|
52
52
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
'malloytest.carriers': {
|
|
54
|
+
type: 'struct',
|
|
55
|
+
name: 'malloytest.carriers',
|
|
56
|
+
dialect: 'standardsql',
|
|
57
|
+
structSource: {
|
|
58
|
+
type: 'table',
|
|
59
|
+
tablePath: 'malloytest.carriers',
|
|
60
60
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{
|
|
64
|
-
{
|
|
65
|
-
{
|
|
61
|
+
structRelationship: { type: 'basetable', connectionName: 'bigquery' },
|
|
62
|
+
fields: [
|
|
63
|
+
{ name: 'code', type: 'string' },
|
|
64
|
+
{ name: 'name', type: 'string' },
|
|
65
|
+
{ name: 'nickname', type: 'string' },
|
|
66
66
|
],
|
|
67
|
-
|
|
67
|
+
as: 'carriers',
|
|
68
68
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
'malloytest.flights': {
|
|
70
|
+
type: 'struct',
|
|
71
|
+
name: 'malloytest.flights',
|
|
72
|
+
dialect: 'standardsql',
|
|
73
|
+
structSource: {
|
|
74
|
+
type: 'table',
|
|
75
|
+
tablePath: 'malloytest.flights',
|
|
76
76
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{
|
|
80
|
-
{
|
|
81
|
-
{
|
|
82
|
-
{
|
|
83
|
-
{
|
|
84
|
-
{
|
|
85
|
-
{
|
|
86
|
-
{
|
|
87
|
-
{
|
|
88
|
-
{
|
|
89
|
-
{
|
|
90
|
-
{
|
|
91
|
-
{
|
|
92
|
-
{
|
|
93
|
-
{
|
|
94
|
-
{
|
|
77
|
+
structRelationship: { type: 'basetable', connectionName: 'bigquery' },
|
|
78
|
+
fields: [
|
|
79
|
+
{ name: 'carrier', type: 'string' },
|
|
80
|
+
{ name: 'origin', type: 'string' },
|
|
81
|
+
{ name: 'destination', type: 'string' },
|
|
82
|
+
{ name: 'flight_num', type: 'string' },
|
|
83
|
+
{ name: 'flight_time', type: 'number', numberType: 'integer' },
|
|
84
|
+
{ name: 'tail_num', type: 'string' },
|
|
85
|
+
{ name: 'dep_time', type: 'timestamp' },
|
|
86
|
+
{ name: 'arr_time', type: 'timestamp' },
|
|
87
|
+
{ name: 'dep_delay', type: 'number', numberType: 'integer' },
|
|
88
|
+
{ name: 'arr_delay', type: 'number', numberType: 'integer' },
|
|
89
|
+
{ name: 'taxi_out', type: 'number', numberType: 'integer' },
|
|
90
|
+
{ name: 'taxi_in', type: 'number', numberType: 'integer' },
|
|
91
|
+
{ name: 'distance', type: 'number', numberType: 'integer' },
|
|
92
|
+
{ name: 'cancelled', type: 'string' },
|
|
93
|
+
{ name: 'diverted', type: 'string' },
|
|
94
|
+
{ name: 'id2', type: 'number', numberType: 'integer' },
|
|
95
95
|
],
|
|
96
|
-
|
|
96
|
+
as: 'flights',
|
|
97
97
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
'malloytest.airports': {
|
|
99
|
+
type: 'struct',
|
|
100
|
+
name: 'malloytest.airports',
|
|
101
|
+
dialect: 'standardsql',
|
|
102
|
+
structSource: {
|
|
103
|
+
type: 'table',
|
|
104
|
+
tablePath: 'malloytest.airports',
|
|
105
105
|
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
{
|
|
109
|
-
{
|
|
110
|
-
{
|
|
111
|
-
{
|
|
112
|
-
{
|
|
113
|
-
{
|
|
114
|
-
{
|
|
115
|
-
{
|
|
116
|
-
{
|
|
117
|
-
{
|
|
118
|
-
{
|
|
119
|
-
{
|
|
120
|
-
{
|
|
121
|
-
{
|
|
122
|
-
{
|
|
123
|
-
{
|
|
124
|
-
{
|
|
125
|
-
{
|
|
126
|
-
{
|
|
127
|
-
{
|
|
128
|
-
{
|
|
129
|
-
{
|
|
130
|
-
{
|
|
131
|
-
{
|
|
132
|
-
{
|
|
133
|
-
{
|
|
134
|
-
{
|
|
106
|
+
structRelationship: { type: 'basetable', connectionName: 'bigquery' },
|
|
107
|
+
fields: [
|
|
108
|
+
{ name: 'id', type: 'number', numberType: 'integer' },
|
|
109
|
+
{ name: 'code', type: 'string' },
|
|
110
|
+
{ name: 'site_number', type: 'string' },
|
|
111
|
+
{ name: 'fac_type', type: 'string' },
|
|
112
|
+
{ name: 'fac_use', type: 'string' },
|
|
113
|
+
{ name: 'faa_region', type: 'string' },
|
|
114
|
+
{ name: 'faa_dist', type: 'string' },
|
|
115
|
+
{ name: 'city', type: 'string' },
|
|
116
|
+
{ name: 'county', type: 'string' },
|
|
117
|
+
{ name: 'state', type: 'string' },
|
|
118
|
+
{ name: 'full_name', type: 'string' },
|
|
119
|
+
{ name: 'own_type', type: 'string' },
|
|
120
|
+
{ name: 'longitude', type: 'number', numberType: 'float' },
|
|
121
|
+
{ name: 'latitude', type: 'number', numberType: 'float' },
|
|
122
|
+
{ name: 'elevation', type: 'number', numberType: 'integer' },
|
|
123
|
+
{ name: 'aero_cht', type: 'string' },
|
|
124
|
+
{ name: 'cbd_dist', type: 'number', numberType: 'integer' },
|
|
125
|
+
{ name: 'cbd_dir', type: 'string' },
|
|
126
|
+
{ name: 'act_date', type: 'string' },
|
|
127
|
+
{ name: 'cert', type: 'string' },
|
|
128
|
+
{ name: 'fed_agree', type: 'string' },
|
|
129
|
+
{ name: 'cust_intl', type: 'string' },
|
|
130
|
+
{ name: 'c_ldg_rts', type: 'string' },
|
|
131
|
+
{ name: 'joint_use', type: 'string' },
|
|
132
|
+
{ name: 'mil_rts', type: 'string' },
|
|
133
|
+
{ name: 'cntl_twr', type: 'string' },
|
|
134
|
+
{ name: 'major', type: 'string' },
|
|
135
135
|
],
|
|
136
|
-
|
|
137
|
-
}
|
|
136
|
+
as: 'airports',
|
|
137
|
+
},
|
|
138
138
|
};
|
|
139
139
|
exports.aTableDef = mockSchema.aTable;
|
|
140
140
|
/**
|
|
@@ -145,7 +145,7 @@ class TestRoot extends ast_1.MalloyElement {
|
|
|
145
145
|
constructor(child, forTranslator, modelDef) {
|
|
146
146
|
super({ child });
|
|
147
147
|
this.modelDef = modelDef;
|
|
148
|
-
this.elementType =
|
|
148
|
+
this.elementType = 'test root';
|
|
149
149
|
this.setTranslator(forTranslator);
|
|
150
150
|
}
|
|
151
151
|
namespace() {
|
|
@@ -153,18 +153,18 @@ class TestRoot extends ast_1.MalloyElement {
|
|
|
153
153
|
}
|
|
154
154
|
getEntry(name) {
|
|
155
155
|
const struct = this.modelDef.contents[name];
|
|
156
|
-
if (struct.type
|
|
156
|
+
if (struct.type === 'struct') {
|
|
157
157
|
const exported = this.modelDef.exports.includes(name);
|
|
158
|
-
return {
|
|
158
|
+
return { entry: struct, exported };
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
setEntry(_name, _val) {
|
|
162
162
|
throw new Error("Can't add entries to test model def");
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
const testURI =
|
|
165
|
+
const testURI = 'internal://test/langtests/root.malloy';
|
|
166
166
|
class TestTranslator extends parse_malloy_1.MalloyTranslator {
|
|
167
|
-
constructor(source, rootRule =
|
|
167
|
+
constructor(source, rootRule = 'malloyDocument') {
|
|
168
168
|
super(testURI);
|
|
169
169
|
/*
|
|
170
170
|
* Tests can assume this model exists:
|
|
@@ -177,50 +177,50 @@ class TestTranslator extends parse_malloy_1.MalloyTranslator {
|
|
|
177
177
|
* }
|
|
178
178
|
*/
|
|
179
179
|
this.internalModel = {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
name: testURI,
|
|
181
|
+
exports: [],
|
|
182
|
+
contents: {
|
|
183
|
+
a: { ...exports.aTableDef, primaryKey: 'astr', as: 'a' },
|
|
184
|
+
b: { ...exports.aTableDef, primaryKey: 'astr', as: 'b' },
|
|
185
|
+
ab: {
|
|
186
186
|
...exports.aTableDef,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
as: 'ab',
|
|
188
|
+
primaryKey: 'astr',
|
|
189
|
+
fields: [
|
|
190
190
|
...exports.aTableDef.fields,
|
|
191
191
|
{
|
|
192
192
|
...exports.aTableDef,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
{
|
|
198
|
-
|
|
199
|
-
{
|
|
200
|
-
]
|
|
201
|
-
}
|
|
193
|
+
as: 'b',
|
|
194
|
+
structRelationship: {
|
|
195
|
+
type: 'one',
|
|
196
|
+
onExpression: [
|
|
197
|
+
{ type: 'field', path: 'astr' },
|
|
198
|
+
'=',
|
|
199
|
+
{ type: 'field', path: 'b.astr' },
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
204
|
+
type: 'number',
|
|
205
|
+
name: 'acount',
|
|
206
|
+
numberType: 'integer',
|
|
207
|
+
expressionType: 'aggregate',
|
|
208
|
+
e: ['COUNT()'],
|
|
209
|
+
code: 'count()',
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
type: 'turtle',
|
|
213
|
+
name: 'aturtle',
|
|
214
|
+
pipeline: [
|
|
215
215
|
{
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
]
|
|
220
|
-
}
|
|
221
|
-
]
|
|
222
|
-
}
|
|
223
|
-
}
|
|
216
|
+
type: 'reduce',
|
|
217
|
+
fields: ['astr', 'acount'],
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
224
|
};
|
|
225
225
|
this.grammarRule = rootRule;
|
|
226
226
|
this.importZone.define(testURI, source);
|
|
@@ -234,7 +234,7 @@ class TestTranslator extends parse_malloy_1.MalloyTranslator {
|
|
|
234
234
|
ast() {
|
|
235
235
|
const astAsk = this.astStep.step(this);
|
|
236
236
|
if (astAsk.ast) {
|
|
237
|
-
if (this.grammarRule !==
|
|
237
|
+
if (this.grammarRule !== 'malloyDocument') {
|
|
238
238
|
this.testRoot = new TestRoot(astAsk.ast, this, this.internalModel);
|
|
239
239
|
}
|
|
240
240
|
return astAsk.ast;
|
|
@@ -248,22 +248,22 @@ class TestTranslator extends parse_malloy_1.MalloyTranslator {
|
|
|
248
248
|
if (whatImports) {
|
|
249
249
|
mysterious = false;
|
|
250
250
|
this.logger.log({
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
at: this.defaultLocation(),
|
|
252
|
+
message: `Missing imports: ${whatImports.join(',')}`,
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
255
|
const needThese = this.schemaZone.getUndefined();
|
|
256
256
|
if (needThese) {
|
|
257
257
|
mysterious = false;
|
|
258
258
|
this.logger.log({
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
at: this.defaultLocation(),
|
|
260
|
+
message: `Missing schema: ${needThese.join(',')}`,
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
263
|
if (mysterious) {
|
|
264
264
|
this.logger.log({
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
at: this.defaultLocation(),
|
|
266
|
+
message: 'mysterious translation failure',
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
269
|
}
|
|
@@ -275,7 +275,7 @@ class TestTranslator extends parse_malloy_1.MalloyTranslator {
|
|
|
275
275
|
}
|
|
276
276
|
exploreFor(exploreName) {
|
|
277
277
|
const explore = this.nameSpace[exploreName];
|
|
278
|
-
if (explore && explore.type ===
|
|
278
|
+
if (explore && explore.type === 'struct') {
|
|
279
279
|
return explore;
|
|
280
280
|
}
|
|
281
281
|
throw new Error(`Expected model to contain explore '${exploreName}'`);
|
|
@@ -291,15 +291,15 @@ function getModelQuery(modelDef, name) {
|
|
|
291
291
|
}
|
|
292
292
|
exports.getModelQuery = getModelQuery;
|
|
293
293
|
function getField(thing, name) {
|
|
294
|
-
const result = thing.fields.find((field) => typeof field !==
|
|
295
|
-
if (typeof result ===
|
|
296
|
-
throw new Error(
|
|
294
|
+
const result = thing.fields.find((field) => typeof field !== 'string' && (field.as || field.name) === name);
|
|
295
|
+
if (typeof result === 'string') {
|
|
296
|
+
throw new Error('Expected a def, got a ref.');
|
|
297
297
|
}
|
|
298
298
|
if (result === undefined) {
|
|
299
|
-
throw new Error(
|
|
299
|
+
throw new Error('Expected a field, not undefined');
|
|
300
300
|
}
|
|
301
301
|
if ((0, malloy_types_1.isFilteredAliasedName)(result)) {
|
|
302
|
-
throw new Error(
|
|
302
|
+
throw new Error('Ignoring these for now');
|
|
303
303
|
}
|
|
304
304
|
return result;
|
|
305
305
|
}
|
|
@@ -315,26 +315,26 @@ function getJoinField(structDef, name) {
|
|
|
315
315
|
}
|
|
316
316
|
exports.getJoinField = getJoinField;
|
|
317
317
|
function markSource(unmarked, ...marked) {
|
|
318
|
-
let code =
|
|
318
|
+
let code = '';
|
|
319
319
|
const locations = [];
|
|
320
320
|
for (let index = 0; index < marked.length; index++) {
|
|
321
321
|
const mark = marked[index];
|
|
322
322
|
code += unmarked[index];
|
|
323
|
-
const lines = code.split(
|
|
323
|
+
const lines = code.split('\n');
|
|
324
324
|
const start = {
|
|
325
|
-
|
|
326
|
-
|
|
325
|
+
line: lines.length - 1,
|
|
326
|
+
character: lines[lines.length - 1].length,
|
|
327
327
|
};
|
|
328
|
-
const bitLines = mark.split(
|
|
328
|
+
const bitLines = mark.split('\n');
|
|
329
329
|
const location = {
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
url: testURI,
|
|
331
|
+
range: {
|
|
332
332
|
start,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}
|
|
337
|
-
}
|
|
333
|
+
end: {
|
|
334
|
+
line: start.line + bitLines.length - 1,
|
|
335
|
+
character: bitLines.length === 1 ? start.character + mark.length : mark.length,
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
338
|
};
|
|
339
339
|
locations.push(location);
|
|
340
340
|
code += mark;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ModelDef, Query, SQLBlockSource, SQLBlockStructDef } from
|
|
2
|
-
import { MalloyElement } from
|
|
3
|
-
import { LogMessage } from
|
|
4
|
-
import { DocumentSymbol } from
|
|
5
|
-
import { DocumentHighlight } from
|
|
6
|
-
import { DocumentCompletion } from
|
|
7
|
-
import { DocumentHelpContext } from
|
|
1
|
+
import { ModelDef, Query, SQLBlockSource, SQLBlockStructDef } from '../model/malloy_types';
|
|
2
|
+
import { MalloyElement } from './ast';
|
|
3
|
+
import { LogMessage } from './parse-log';
|
|
4
|
+
import { DocumentSymbol } from './parse-tree-walkers/document-symbol-walker';
|
|
5
|
+
import { DocumentHighlight } from './parse-tree-walkers/document-highlight-walker';
|
|
6
|
+
import { DocumentCompletion } from './parse-tree-walkers/document-completion-walker';
|
|
7
|
+
import { DocumentHelpContext } from './parse-tree-walkers/document-help-context-walker';
|
|
8
8
|
/**
|
|
9
9
|
* The translation interface is essentially a request/response protocol, and
|
|
10
10
|
* this is the list of all the "protocol" messages.
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.isNeedResponse = void 0;
|
|
26
26
|
function isNeedResponse(dr) {
|
|
27
|
-
return !!dr && (dr.tables || dr.urls || dr.compileSQL)
|
|
27
|
+
return !!dr && (dr.tables || dr.urls || dr.compileSQL) !== undefined;
|
|
28
28
|
}
|
|
29
29
|
exports.isNeedResponse = isNeedResponse;
|
|
30
30
|
//# sourceMappingURL=translate-response.js.map
|
package/dist/lang/zone.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { DocumentLocation } from
|
|
1
|
+
import { DocumentLocation } from '../model/malloy_types';
|
|
2
2
|
export declare type ZoneData<TValue> = Record<string, TValue>;
|
|
3
|
-
declare type EntryStatus =
|
|
3
|
+
declare type EntryStatus = 'present' | 'reference' | 'error';
|
|
4
4
|
interface AllEntries {
|
|
5
5
|
status: EntryStatus;
|
|
6
6
|
firstReference?: DocumentLocation;
|
|
7
7
|
}
|
|
8
8
|
interface EntryPresent<T> extends AllEntries {
|
|
9
|
-
status:
|
|
9
|
+
status: 'present';
|
|
10
10
|
value: T;
|
|
11
11
|
}
|
|
12
12
|
interface ReferenceEntry {
|
|
13
|
-
status:
|
|
13
|
+
status: 'reference';
|
|
14
14
|
firstReference: DocumentLocation;
|
|
15
15
|
}
|
|
16
16
|
interface EntryErrored extends AllEntries {
|
|
17
|
-
status:
|
|
17
|
+
status: 'error';
|
|
18
18
|
message: string;
|
|
19
19
|
}
|
|
20
20
|
declare type ZoneEntry<T> = EntryPresent<T> | ReferenceEntry | EntryErrored;
|
package/dist/lang/zone.js
CHANGED
|
@@ -37,7 +37,7 @@ class Zone {
|
|
|
37
37
|
}
|
|
38
38
|
get(str) {
|
|
39
39
|
const zst = this.zone.get(str);
|
|
40
|
-
if ((zst === null || zst === void 0 ? void 0 : zst.status) ===
|
|
40
|
+
if ((zst === null || zst === void 0 ? void 0 : zst.status) === 'present') {
|
|
41
41
|
return zst.value;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -47,9 +47,9 @@ class Zone {
|
|
|
47
47
|
if (zst.firstReference || !this.location[str]) {
|
|
48
48
|
return zst;
|
|
49
49
|
}
|
|
50
|
-
return { ...zst,
|
|
50
|
+
return { ...zst, firstReference: this.location[str] };
|
|
51
51
|
}
|
|
52
|
-
return {
|
|
52
|
+
return { status: 'error', message: 'import reference failure' };
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* Add a symbol and it's definition to the symbol table.
|
|
@@ -57,7 +57,7 @@ class Zone {
|
|
|
57
57
|
* @param val
|
|
58
58
|
*/
|
|
59
59
|
define(str, val) {
|
|
60
|
-
this.zone.set(str, {
|
|
60
|
+
this.zone.set(str, { status: 'present', value: val });
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Add a symbol to the symbol table.
|
|
@@ -66,8 +66,8 @@ class Zone {
|
|
|
66
66
|
*/
|
|
67
67
|
reference(str, loc) {
|
|
68
68
|
const zst = this.zone.get(str);
|
|
69
|
-
if ((zst === null || zst === void 0 ? void 0 : zst.status)
|
|
70
|
-
this.zone.set(str, {
|
|
69
|
+
if ((zst === null || zst === void 0 ? void 0 : zst.status) === undefined) {
|
|
70
|
+
this.zone.set(str, { status: 'reference', firstReference: loc });
|
|
71
71
|
this.location[str] = loc;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -77,7 +77,7 @@ class Zone {
|
|
|
77
77
|
getUndefined() {
|
|
78
78
|
const allUndefined = [];
|
|
79
79
|
for (const [name, val] of this.zone) {
|
|
80
|
-
if (val.status ===
|
|
80
|
+
if (val.status === 'reference') {
|
|
81
81
|
allUndefined.push(name);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -98,7 +98,7 @@ class Zone {
|
|
|
98
98
|
}
|
|
99
99
|
if (errorData) {
|
|
100
100
|
for (const [errorKey, errorMessage] of Object.entries(errorData)) {
|
|
101
|
-
this.zone.set(errorKey, {
|
|
101
|
+
this.zone.set(errorKey, { status: 'error', message: errorMessage });
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
}
|
package/dist/malloy.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { RunSQLOptions } from
|
|
3
|
-
import { DocumentCompletion as DocumentCompletionDefinition, DocumentHighlight as DocumentHighlightDefinition, DocumentSymbol as DocumentSymbolDefinition, LogMessage, MalloyTranslator } from
|
|
4
|
-
import { DocumentHelpContext } from
|
|
5
|
-
import { CompiledQuery, DocumentReference, FieldBooleanDef, FieldDateDef, FieldJSONDef, FieldNumberDef, FieldStringDef, FieldTimestampDef, FieldTypeDef, FilterExpression, Query as InternalQuery, ModelDef, DocumentPosition as ModelDocumentPosition, NamedQuery, QueryData, QueryDataRow, QueryResult, SQLBlock, SQLBlockStructDef, SearchIndexResult, SearchValueMapResult, StructDef, TurtleDef, FieldUnsupportedDef } from
|
|
6
|
-
import { Connection, InfoConnection, LookupConnection, ModelString, ModelURL, QueryString, QueryURL, URLReader } from
|
|
2
|
+
import { RunSQLOptions } from './run_sql_options';
|
|
3
|
+
import { DocumentCompletion as DocumentCompletionDefinition, DocumentHighlight as DocumentHighlightDefinition, DocumentSymbol as DocumentSymbolDefinition, LogMessage, MalloyTranslator } from './lang';
|
|
4
|
+
import { DocumentHelpContext } from './lang/parse-tree-walkers/document-help-context-walker';
|
|
5
|
+
import { CompiledQuery, DocumentReference, FieldBooleanDef, FieldDateDef, FieldJSONDef, FieldNumberDef, FieldStringDef, FieldTimestampDef, FieldTypeDef, FilterExpression, Query as InternalQuery, ModelDef, DocumentPosition as ModelDocumentPosition, NamedQuery, QueryData, QueryDataRow, QueryResult, SQLBlock, SQLBlockStructDef, SearchIndexResult, SearchValueMapResult, StructDef, TurtleDef, FieldUnsupportedDef } from './model';
|
|
6
|
+
import { Connection, InfoConnection, LookupConnection, ModelString, ModelURL, QueryString, QueryURL, URLReader } from './runtime_types';
|
|
7
7
|
export interface Loggable {
|
|
8
8
|
debug: (message?: any, ...optionalParams: any[]) => void;
|
|
9
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
@@ -23,7 +23,7 @@ export declare class Malloy {
|
|
|
23
23
|
* @param urlReader Object capable of fetching URL contents.
|
|
24
24
|
* @return A (promise of a) `Parse` result.
|
|
25
25
|
*/
|
|
26
|
-
static parse({ url, urlReader }: {
|
|
26
|
+
static parse({ url, urlReader, }: {
|
|
27
27
|
url: URL;
|
|
28
28
|
urlReader: URLReader;
|
|
29
29
|
}): Promise<Parse>;
|
|
@@ -47,7 +47,7 @@ export declare class Malloy {
|
|
|
47
47
|
* @param model A compiled model to build upon (optional).
|
|
48
48
|
* @return A (promise of a) compiled `Model`.
|
|
49
49
|
*/
|
|
50
|
-
static compile({ urlReader, connections, parse, model }: {
|
|
50
|
+
static compile({ urlReader, connections, parse, model, }: {
|
|
51
51
|
urlReader: URLReader;
|
|
52
52
|
connections: LookupConnection<InfoConnection>;
|
|
53
53
|
parse: Parse;
|