@malloydata/malloy 0.0.361 → 0.0.363
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/api/core.js +21 -3
- package/dist/api/foundation/compile.js +20 -0
- package/dist/api/foundation/runtime.d.ts +16 -4
- package/dist/api/foundation/runtime.js +22 -4
- package/dist/api/foundation/types.d.ts +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/lang/ast/index.d.ts +5 -0
- package/dist/lang/ast/index.js +5 -0
- package/dist/lang/ast/source-elements/named-source.js +4 -0
- package/dist/lang/ast/source-elements/typed-source.d.ts +23 -0
- package/dist/lang/ast/source-elements/typed-source.js +133 -0
- package/dist/lang/ast/source-elements/virtual-source.d.ts +10 -0
- package/dist/lang/ast/source-elements/virtual-source.js +47 -0
- package/dist/lang/ast/source-properties/user-type-shape.d.ts +29 -0
- package/dist/lang/ast/source-properties/user-type-shape.js +100 -0
- package/dist/lang/ast/source-query-elements/sq-reference.js +1 -1
- package/dist/lang/ast/source-query-elements/sq-typed-source.d.ts +18 -0
- package/dist/lang/ast/source-query-elements/sq-typed-source.js +39 -0
- package/dist/lang/ast/statements/define-user-type.d.ts +28 -0
- package/dist/lang/ast/statements/define-user-type.js +82 -0
- package/dist/lang/ast/types/malloy-element.js +14 -6
- package/dist/lang/lib/Malloy/MalloyLexer.d.ts +146 -144
- package/dist/lang/lib/Malloy/MalloyLexer.js +1408 -1391
- package/dist/lang/lib/Malloy/MalloyParser.d.ts +491 -307
- package/dist/lang/lib/Malloy/MalloyParser.js +7907 -6680
- package/dist/lang/lib/Malloy/MalloyParserListener.d.ts +186 -0
- package/dist/lang/lib/Malloy/MalloyParserVisitor.d.ts +117 -0
- package/dist/lang/malloy-to-ast.d.ts +17 -0
- package/dist/lang/malloy-to-ast.js +118 -0
- package/dist/lang/parse-log.d.ts +12 -1
- package/dist/lang/parse-malloy.d.ts +6 -1
- package/dist/lang/parse-malloy.js +17 -1
- package/dist/lang/parse-tree-walkers/find-external-references.d.ts +4 -0
- package/dist/lang/parse-tree-walkers/find-external-references.js +10 -0
- package/dist/lang/test/test-translator.d.ts +2 -1
- package/dist/lang/test/test-translator.js +10 -0
- package/dist/lang/translate-response.d.ts +6 -1
- package/dist/lang/translate-response.js +3 -1
- package/dist/model/malloy_types.d.ts +23 -2
- package/dist/model/malloy_types.js +12 -2
- package/dist/model/query_model_impl.js +3 -0
- package/dist/model/query_query.js +11 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.UserTypeShape = exports.UserTypeMemberIndirect = exports.UserTypeMemberDef = exports.UserTypeMember = void 0;
|
|
8
|
+
const malloy_types_1 = require("../../../model/malloy_types");
|
|
9
|
+
const malloy_element_1 = require("../types/malloy-element");
|
|
10
|
+
const noteable_1 = require("../types/noteable");
|
|
11
|
+
class UserTypeMember extends malloy_element_1.MalloyElement {
|
|
12
|
+
constructor(name) {
|
|
13
|
+
super();
|
|
14
|
+
this.name = name;
|
|
15
|
+
this.isNoteableObj = true;
|
|
16
|
+
this.extendNote = noteable_1.extendNoteMethod;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.UserTypeMember = UserTypeMember;
|
|
20
|
+
class UserTypeMemberDef extends UserTypeMember {
|
|
21
|
+
constructor(name, typeDef) {
|
|
22
|
+
super(name);
|
|
23
|
+
this.typeDef = typeDef;
|
|
24
|
+
this.elementType = 'userTypeMemberDef';
|
|
25
|
+
}
|
|
26
|
+
userTypeFieldDef() {
|
|
27
|
+
const field = {
|
|
28
|
+
name: this.name,
|
|
29
|
+
typeDef: this.typeDef,
|
|
30
|
+
};
|
|
31
|
+
if (this.note) {
|
|
32
|
+
field.annotation = this.note;
|
|
33
|
+
}
|
|
34
|
+
return field;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.UserTypeMemberDef = UserTypeMemberDef;
|
|
38
|
+
class UserTypeMemberIndirect extends UserTypeMember {
|
|
39
|
+
constructor(name, shapeName, arrayDepth = 0) {
|
|
40
|
+
super(name);
|
|
41
|
+
this.shapeName = shapeName;
|
|
42
|
+
this.arrayDepth = arrayDepth;
|
|
43
|
+
this.elementType = 'userTypeMemberIndirect';
|
|
44
|
+
}
|
|
45
|
+
userTypeFieldDef() {
|
|
46
|
+
const error = {
|
|
47
|
+
name: this.name,
|
|
48
|
+
typeDef: { type: 'error' },
|
|
49
|
+
};
|
|
50
|
+
const doc = this.document();
|
|
51
|
+
if (doc === undefined) {
|
|
52
|
+
return error;
|
|
53
|
+
}
|
|
54
|
+
const modelEntry = doc.modelEntry(this.shapeName);
|
|
55
|
+
if (modelEntry === undefined) {
|
|
56
|
+
this.logError('user-type-not-found', `User type '${this.shapeName}' is not defined`);
|
|
57
|
+
return error;
|
|
58
|
+
}
|
|
59
|
+
if (!(0, malloy_types_1.isUserTypeDef)(modelEntry.entry)) {
|
|
60
|
+
this.logError('not-a-user-type', `'${this.shapeName}' is not a user type`);
|
|
61
|
+
return error;
|
|
62
|
+
}
|
|
63
|
+
const fieldsFromReferencedType = modelEntry.entry.fields.map(f => {
|
|
64
|
+
const field = (0, malloy_types_1.mkFieldDef)(f.typeDef, f.name);
|
|
65
|
+
if (f.annotation) {
|
|
66
|
+
field.annotation = f.annotation;
|
|
67
|
+
}
|
|
68
|
+
return field;
|
|
69
|
+
});
|
|
70
|
+
let typeDef = {
|
|
71
|
+
type: 'record',
|
|
72
|
+
fields: fieldsFromReferencedType,
|
|
73
|
+
};
|
|
74
|
+
for (let i = 0; i < this.arrayDepth; i++) {
|
|
75
|
+
typeDef = (0, malloy_types_1.mkArrayTypeDef)(typeDef);
|
|
76
|
+
}
|
|
77
|
+
const field = { name: this.name, typeDef };
|
|
78
|
+
if (this.note) {
|
|
79
|
+
field.annotation = modelEntry.entry.annotation
|
|
80
|
+
? { ...this.note, inherits: modelEntry.entry.annotation }
|
|
81
|
+
: this.note;
|
|
82
|
+
}
|
|
83
|
+
else if (modelEntry.entry.annotation) {
|
|
84
|
+
field.annotation = { inherits: modelEntry.entry.annotation };
|
|
85
|
+
}
|
|
86
|
+
return field;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.UserTypeMemberIndirect = UserTypeMemberIndirect;
|
|
90
|
+
class UserTypeShape extends malloy_element_1.ListOf {
|
|
91
|
+
constructor() {
|
|
92
|
+
super(...arguments);
|
|
93
|
+
this.elementType = 'userTypeShape';
|
|
94
|
+
}
|
|
95
|
+
userTypeFieldDefs() {
|
|
96
|
+
return this.elements.map(member => member.userTypeFieldDef());
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.UserTypeShape = UserTypeShape;
|
|
100
|
+
//# sourceMappingURL=user-type-shape.js.map
|
|
@@ -86,7 +86,7 @@ class SQReference extends source_query_element_1.SourceQueryElement {
|
|
|
86
86
|
this.asSource = new named_source_1.NamedSource(this.ref, undefined, this.args);
|
|
87
87
|
}
|
|
88
88
|
else {
|
|
89
|
-
this.sqLog('cannot-use-
|
|
89
|
+
this.sqLog('cannot-use-user-type-as-source', `Expected '${this.ref.refString}' to be a query or source, not a user type`);
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
this.has({ asSource: this.asSource });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TypedSource } from '../source-elements/typed-source';
|
|
2
|
+
import { SourceQueryElement } from './source-query-element';
|
|
3
|
+
import type { ModelEntryReference } from '../types/malloy-element';
|
|
4
|
+
/**
|
|
5
|
+
* Applies user type constraints to a source using
|
|
6
|
+
* the `::` operator.
|
|
7
|
+
*
|
|
8
|
+
* e.g. `conn.virtual('t')::MyType`
|
|
9
|
+
* e.g. `flights::(Schema1, Schema2)`
|
|
10
|
+
*/
|
|
11
|
+
export declare class SQTypedSource extends SourceQueryElement {
|
|
12
|
+
readonly sqSrc: SourceQueryElement;
|
|
13
|
+
readonly userTypes: ModelEntryReference[];
|
|
14
|
+
elementType: string;
|
|
15
|
+
constructor(sqSrc: SourceQueryElement, userTypes: ModelEntryReference[]);
|
|
16
|
+
getSource(): TypedSource | undefined;
|
|
17
|
+
isSource(): boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.SQTypedSource = void 0;
|
|
8
|
+
const typed_source_1 = require("../source-elements/typed-source");
|
|
9
|
+
const source_query_element_1 = require("./source-query-element");
|
|
10
|
+
/**
|
|
11
|
+
* Applies user type constraints to a source using
|
|
12
|
+
* the `::` operator.
|
|
13
|
+
*
|
|
14
|
+
* e.g. `conn.virtual('t')::MyType`
|
|
15
|
+
* e.g. `flights::(Schema1, Schema2)`
|
|
16
|
+
*/
|
|
17
|
+
class SQTypedSource extends source_query_element_1.SourceQueryElement {
|
|
18
|
+
constructor(sqSrc, userTypes) {
|
|
19
|
+
super({ sqSrc });
|
|
20
|
+
this.sqSrc = sqSrc;
|
|
21
|
+
this.userTypes = userTypes;
|
|
22
|
+
this.elementType = 'sq-typed-source';
|
|
23
|
+
this.has({ userTypes });
|
|
24
|
+
}
|
|
25
|
+
getSource() {
|
|
26
|
+
const src = this.sqSrc.getSource();
|
|
27
|
+
if (src) {
|
|
28
|
+
const typed = new typed_source_1.TypedSource(src, this.userTypes);
|
|
29
|
+
this.has({ typed });
|
|
30
|
+
return typed;
|
|
31
|
+
}
|
|
32
|
+
this.sqLog('failed-to-compute-source-to-type', 'Could not compute source to apply type constraints');
|
|
33
|
+
}
|
|
34
|
+
isSource() {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.SQTypedSource = SQTypedSource;
|
|
39
|
+
//# sourceMappingURL=sq-typed-source.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { DocStatement, Document } from '../types/malloy-element';
|
|
2
|
+
import { MalloyElement, DocStatementList } from '../types/malloy-element';
|
|
3
|
+
import type { Noteable } from '../types/noteable';
|
|
4
|
+
import { extendNoteMethod } from '../types/noteable';
|
|
5
|
+
import type { Annotation, UserTypeFieldDef } from '../../../model/malloy_types';
|
|
6
|
+
import type { UserTypeMember } from '../source-properties/user-type-shape';
|
|
7
|
+
import { UserTypeShape } from '../source-properties/user-type-shape';
|
|
8
|
+
export declare class ExtendedUserTypeShape extends UserTypeShape {
|
|
9
|
+
readonly extendName: string;
|
|
10
|
+
type: string;
|
|
11
|
+
constructor(parts: UserTypeMember[], extendName: string);
|
|
12
|
+
userTypeFieldDefs(): UserTypeFieldDef[];
|
|
13
|
+
}
|
|
14
|
+
export declare class DefineUserType extends MalloyElement implements DocStatement, Noteable {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly shapeDef: UserTypeShape;
|
|
17
|
+
readonly exported: boolean;
|
|
18
|
+
elementType: string;
|
|
19
|
+
constructor(name: string, shapeDef: UserTypeShape, exported: boolean);
|
|
20
|
+
readonly isNoteableObj = true;
|
|
21
|
+
extendNote: typeof extendNoteMethod;
|
|
22
|
+
note?: Annotation;
|
|
23
|
+
execute(doc: Document): void;
|
|
24
|
+
}
|
|
25
|
+
export declare class DefineUserTypeList extends DocStatementList {
|
|
26
|
+
elementType: string;
|
|
27
|
+
constructor(userTypeList: DefineUserType[]);
|
|
28
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Contributors to the Malloy project
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DefineUserTypeList = exports.DefineUserType = exports.ExtendedUserTypeShape = void 0;
|
|
8
|
+
const malloy_element_1 = require("../types/malloy-element");
|
|
9
|
+
const noteable_1 = require("../types/noteable");
|
|
10
|
+
const malloy_types_1 = require("../../../model/malloy_types");
|
|
11
|
+
const user_type_shape_1 = require("../source-properties/user-type-shape");
|
|
12
|
+
class ExtendedUserTypeShape extends user_type_shape_1.UserTypeShape {
|
|
13
|
+
constructor(parts, extendName) {
|
|
14
|
+
super(parts);
|
|
15
|
+
this.extendName = extendName;
|
|
16
|
+
this.type = 'extendedUserTypeShape';
|
|
17
|
+
}
|
|
18
|
+
userTypeFieldDefs() {
|
|
19
|
+
const doc = this.document();
|
|
20
|
+
const baseFields = new Map();
|
|
21
|
+
if (doc) {
|
|
22
|
+
const modelEntry = doc.modelEntry(this.extendName);
|
|
23
|
+
if (modelEntry === undefined) {
|
|
24
|
+
this.logError('user-type-not-found', `User type '${this.extendName}' is not defined`);
|
|
25
|
+
}
|
|
26
|
+
else if (!(0, malloy_types_1.isUserTypeDef)(modelEntry.entry)) {
|
|
27
|
+
this.logError('not-a-user-type', `'${this.extendName}' is not a user type`);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
for (const f of modelEntry.entry.fields) {
|
|
31
|
+
baseFields.set(f.name, f);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
for (const f of super.userTypeFieldDefs()) {
|
|
36
|
+
baseFields.set(f.name, f);
|
|
37
|
+
}
|
|
38
|
+
return [...baseFields.values()];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.ExtendedUserTypeShape = ExtendedUserTypeShape;
|
|
42
|
+
class DefineUserType extends malloy_element_1.MalloyElement {
|
|
43
|
+
constructor(name, shapeDef, exported) {
|
|
44
|
+
super();
|
|
45
|
+
this.name = name;
|
|
46
|
+
this.shapeDef = shapeDef;
|
|
47
|
+
this.exported = exported;
|
|
48
|
+
this.elementType = 'defineUserType';
|
|
49
|
+
this.isNoteableObj = true;
|
|
50
|
+
this.extendNote = noteable_1.extendNoteMethod;
|
|
51
|
+
this.has({ shapeDef });
|
|
52
|
+
}
|
|
53
|
+
execute(doc) {
|
|
54
|
+
if (doc.modelEntry(this.name)) {
|
|
55
|
+
this.logError('user-type-definition-name-conflict', `Cannot redefine '${this.name}'`);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const fields = this.shapeDef.userTypeFieldDefs();
|
|
59
|
+
if (fields === undefined) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const entry = {
|
|
63
|
+
type: 'userType',
|
|
64
|
+
name: this.name,
|
|
65
|
+
fields,
|
|
66
|
+
location: this.location,
|
|
67
|
+
};
|
|
68
|
+
if (this.note) {
|
|
69
|
+
entry.annotation = this.note;
|
|
70
|
+
}
|
|
71
|
+
doc.setEntry(this.name, { entry, exported: this.exported });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.DefineUserType = DefineUserType;
|
|
75
|
+
class DefineUserTypeList extends malloy_element_1.DocStatementList {
|
|
76
|
+
constructor(userTypeList) {
|
|
77
|
+
super(userTypeList);
|
|
78
|
+
this.elementType = 'defineUserTypes';
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.DefineUserTypeList = DefineUserTypeList;
|
|
82
|
+
//# sourceMappingURL=define-user-type.js.map
|
|
@@ -464,7 +464,8 @@ class Document extends MalloyElement {
|
|
|
464
464
|
const entry = { ...orig };
|
|
465
465
|
if ((0, malloy_types_1.isSourceDef)(entry) ||
|
|
466
466
|
entry.type === 'query' ||
|
|
467
|
-
entry.type === 'function'
|
|
467
|
+
entry.type === 'function' ||
|
|
468
|
+
entry.type === 'userType') {
|
|
468
469
|
const exported = extendingModelDef.exports.includes(nm);
|
|
469
470
|
this.setEntry(nm, { entry, exported });
|
|
470
471
|
}
|
|
@@ -518,15 +519,22 @@ class Document extends MalloyElement {
|
|
|
518
519
|
}
|
|
519
520
|
for (const [name, modelEntry] of this.documentModel) {
|
|
520
521
|
const entryDef = modelEntry.entry;
|
|
521
|
-
if ((0, malloy_types_1.isSourceDef)(entryDef) ||
|
|
522
|
+
if ((0, malloy_types_1.isSourceDef)(entryDef) ||
|
|
523
|
+
entryDef.type === 'query' ||
|
|
524
|
+
entryDef.type === 'userType') {
|
|
522
525
|
if (modelEntry.exported) {
|
|
523
526
|
def.exports.push(name);
|
|
524
527
|
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
+
if (entryDef.type === 'userType') {
|
|
529
|
+
def.contents[name] = { ...entryDef };
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
const newEntry = { ...entryDef };
|
|
533
|
+
if (newEntry.modelAnnotation === undefined && def.annotation) {
|
|
534
|
+
newEntry.modelAnnotation = def.annotation;
|
|
535
|
+
}
|
|
536
|
+
def.contents[name] = newEntry;
|
|
528
537
|
}
|
|
529
|
-
def.contents[name] = newEntry;
|
|
530
538
|
}
|
|
531
539
|
}
|
|
532
540
|
// Copy the accumulated sourceRegistry
|
|
@@ -37,150 +37,152 @@ export declare class MalloyLexer extends Lexer {
|
|
|
37
37
|
static readonly SAMPLE = 31;
|
|
38
38
|
static readonly SELECT = 32;
|
|
39
39
|
static readonly SOURCE = 33;
|
|
40
|
-
static readonly
|
|
41
|
-
static readonly
|
|
42
|
-
static readonly
|
|
43
|
-
static readonly
|
|
44
|
-
static readonly
|
|
45
|
-
static readonly
|
|
46
|
-
static readonly
|
|
47
|
-
static readonly
|
|
48
|
-
static readonly
|
|
49
|
-
static readonly
|
|
50
|
-
static readonly
|
|
51
|
-
static readonly
|
|
52
|
-
static readonly
|
|
53
|
-
static readonly
|
|
54
|
-
static readonly
|
|
55
|
-
static readonly
|
|
56
|
-
static readonly
|
|
57
|
-
static readonly
|
|
58
|
-
static readonly
|
|
59
|
-
static readonly
|
|
60
|
-
static readonly
|
|
61
|
-
static readonly
|
|
62
|
-
static readonly
|
|
63
|
-
static readonly
|
|
64
|
-
static readonly
|
|
65
|
-
static readonly
|
|
66
|
-
static readonly
|
|
67
|
-
static readonly
|
|
68
|
-
static readonly
|
|
69
|
-
static readonly
|
|
70
|
-
static readonly
|
|
71
|
-
static readonly
|
|
72
|
-
static readonly
|
|
73
|
-
static readonly
|
|
74
|
-
static readonly
|
|
75
|
-
static readonly
|
|
76
|
-
static readonly
|
|
77
|
-
static readonly
|
|
78
|
-
static readonly
|
|
79
|
-
static readonly
|
|
80
|
-
static readonly
|
|
81
|
-
static readonly
|
|
82
|
-
static readonly
|
|
83
|
-
static readonly
|
|
84
|
-
static readonly
|
|
85
|
-
static readonly
|
|
86
|
-
static readonly
|
|
87
|
-
static readonly
|
|
88
|
-
static readonly
|
|
89
|
-
static readonly
|
|
90
|
-
static readonly
|
|
91
|
-
static readonly
|
|
92
|
-
static readonly
|
|
93
|
-
static readonly
|
|
94
|
-
static readonly
|
|
95
|
-
static readonly
|
|
96
|
-
static readonly
|
|
97
|
-
static readonly
|
|
98
|
-
static readonly
|
|
99
|
-
static readonly
|
|
100
|
-
static readonly
|
|
101
|
-
static readonly
|
|
102
|
-
static readonly
|
|
103
|
-
static readonly
|
|
104
|
-
static readonly
|
|
105
|
-
static readonly
|
|
106
|
-
static readonly
|
|
107
|
-
static readonly
|
|
108
|
-
static readonly
|
|
109
|
-
static readonly
|
|
110
|
-
static readonly
|
|
111
|
-
static readonly
|
|
112
|
-
static readonly
|
|
113
|
-
static readonly
|
|
114
|
-
static readonly
|
|
115
|
-
static readonly
|
|
116
|
-
static readonly
|
|
117
|
-
static readonly
|
|
118
|
-
static readonly
|
|
119
|
-
static readonly
|
|
120
|
-
static readonly
|
|
121
|
-
static readonly
|
|
122
|
-
static readonly
|
|
123
|
-
static readonly
|
|
124
|
-
static readonly
|
|
125
|
-
static readonly
|
|
126
|
-
static readonly
|
|
127
|
-
static readonly
|
|
128
|
-
static readonly
|
|
129
|
-
static readonly
|
|
130
|
-
static readonly
|
|
131
|
-
static readonly
|
|
132
|
-
static readonly
|
|
133
|
-
static readonly
|
|
134
|
-
static readonly
|
|
135
|
-
static readonly
|
|
136
|
-
static readonly
|
|
137
|
-
static readonly
|
|
138
|
-
static readonly
|
|
139
|
-
static readonly
|
|
140
|
-
static readonly
|
|
141
|
-
static readonly
|
|
142
|
-
static readonly
|
|
143
|
-
static readonly
|
|
144
|
-
static readonly
|
|
145
|
-
static readonly
|
|
146
|
-
static readonly
|
|
147
|
-
static readonly
|
|
148
|
-
static readonly
|
|
149
|
-
static readonly
|
|
150
|
-
static readonly
|
|
151
|
-
static readonly
|
|
152
|
-
static readonly
|
|
153
|
-
static readonly
|
|
154
|
-
static readonly
|
|
155
|
-
static readonly
|
|
156
|
-
static readonly
|
|
157
|
-
static readonly
|
|
158
|
-
static readonly
|
|
159
|
-
static readonly
|
|
160
|
-
static readonly
|
|
161
|
-
static readonly
|
|
162
|
-
static readonly
|
|
163
|
-
static readonly
|
|
164
|
-
static readonly
|
|
165
|
-
static readonly
|
|
166
|
-
static readonly
|
|
167
|
-
static readonly
|
|
168
|
-
static readonly
|
|
169
|
-
static readonly
|
|
170
|
-
static readonly
|
|
171
|
-
static readonly
|
|
172
|
-
static readonly
|
|
173
|
-
static readonly
|
|
174
|
-
static readonly
|
|
175
|
-
static readonly
|
|
176
|
-
static readonly
|
|
177
|
-
static readonly
|
|
178
|
-
static readonly
|
|
179
|
-
static readonly
|
|
180
|
-
static readonly
|
|
181
|
-
static readonly
|
|
182
|
-
static readonly
|
|
183
|
-
static readonly
|
|
40
|
+
static readonly TYPE = 34;
|
|
41
|
+
static readonly TOP = 35;
|
|
42
|
+
static readonly WHERE = 36;
|
|
43
|
+
static readonly VIEW = 37;
|
|
44
|
+
static readonly TIMEZONE = 38;
|
|
45
|
+
static readonly ALL = 39;
|
|
46
|
+
static readonly AND = 40;
|
|
47
|
+
static readonly AS = 41;
|
|
48
|
+
static readonly ASC = 42;
|
|
49
|
+
static readonly AVG = 43;
|
|
50
|
+
static readonly BOOLEAN = 44;
|
|
51
|
+
static readonly BY = 45;
|
|
52
|
+
static readonly CASE = 46;
|
|
53
|
+
static readonly CAST = 47;
|
|
54
|
+
static readonly CONDITION = 48;
|
|
55
|
+
static readonly COUNT = 49;
|
|
56
|
+
static readonly COMPOSE = 50;
|
|
57
|
+
static readonly DATE = 51;
|
|
58
|
+
static readonly DAY = 52;
|
|
59
|
+
static readonly DESC = 53;
|
|
60
|
+
static readonly DISTINCT = 54;
|
|
61
|
+
static readonly ELSE = 55;
|
|
62
|
+
static readonly END = 56;
|
|
63
|
+
static readonly EXCLUDE = 57;
|
|
64
|
+
static readonly EXTEND = 58;
|
|
65
|
+
static readonly FALSE = 59;
|
|
66
|
+
static readonly FILTER = 60;
|
|
67
|
+
static readonly FULL = 61;
|
|
68
|
+
static readonly FOR = 62;
|
|
69
|
+
static readonly FROM = 63;
|
|
70
|
+
static readonly HAS = 64;
|
|
71
|
+
static readonly HOUR = 65;
|
|
72
|
+
static readonly IMPORT = 66;
|
|
73
|
+
static readonly INCLUDE = 67;
|
|
74
|
+
static readonly INNER = 68;
|
|
75
|
+
static readonly IS = 69;
|
|
76
|
+
static readonly IN = 70;
|
|
77
|
+
static readonly INTERNAL_KW = 71;
|
|
78
|
+
static readonly JSON = 72;
|
|
79
|
+
static readonly LAST = 73;
|
|
80
|
+
static readonly LEFT = 74;
|
|
81
|
+
static readonly LIKE = 75;
|
|
82
|
+
static readonly MAX = 76;
|
|
83
|
+
static readonly MIN = 77;
|
|
84
|
+
static readonly MINUTE = 78;
|
|
85
|
+
static readonly MONTH = 79;
|
|
86
|
+
static readonly NOT = 80;
|
|
87
|
+
static readonly NOW = 81;
|
|
88
|
+
static readonly NULL = 82;
|
|
89
|
+
static readonly NUMBER = 83;
|
|
90
|
+
static readonly ON = 84;
|
|
91
|
+
static readonly OR = 85;
|
|
92
|
+
static readonly PICK = 86;
|
|
93
|
+
static readonly PRIVATE_KW = 87;
|
|
94
|
+
static readonly PUBLIC_KW = 88;
|
|
95
|
+
static readonly QUARTER = 89;
|
|
96
|
+
static readonly RIGHT = 90;
|
|
97
|
+
static readonly SECOND = 91;
|
|
98
|
+
static readonly STRING = 92;
|
|
99
|
+
static readonly SOURCE_KW = 93;
|
|
100
|
+
static readonly SUM = 94;
|
|
101
|
+
static readonly SQL = 95;
|
|
102
|
+
static readonly TABLE = 96;
|
|
103
|
+
static readonly THEN = 97;
|
|
104
|
+
static readonly THIS = 98;
|
|
105
|
+
static readonly TIMESTAMPTZ = 99;
|
|
106
|
+
static readonly TIMESTAMP = 100;
|
|
107
|
+
static readonly TO = 101;
|
|
108
|
+
static readonly TRUE = 102;
|
|
109
|
+
static readonly TURTLE = 103;
|
|
110
|
+
static readonly WEEK = 104;
|
|
111
|
+
static readonly WHEN = 105;
|
|
112
|
+
static readonly WITH = 106;
|
|
113
|
+
static readonly YEAR = 107;
|
|
114
|
+
static readonly UNGROUPED = 108;
|
|
115
|
+
static readonly VIRTUAL = 109;
|
|
116
|
+
static readonly HACKY_REGEX = 110;
|
|
117
|
+
static readonly RAW_SQ = 111;
|
|
118
|
+
static readonly RAW_DQ = 112;
|
|
119
|
+
static readonly SQ3_FILTER = 113;
|
|
120
|
+
static readonly SQ_FILTER = 114;
|
|
121
|
+
static readonly DQ3_FILTER = 115;
|
|
122
|
+
static readonly DQ_FILTER = 116;
|
|
123
|
+
static readonly BQ3_FILTER = 117;
|
|
124
|
+
static readonly BQ_FILTER = 118;
|
|
125
|
+
static readonly SQ_STRING = 119;
|
|
126
|
+
static readonly DQ_STRING = 120;
|
|
127
|
+
static readonly BQ_STRING = 121;
|
|
128
|
+
static readonly DOC_BLOCK_ANNOTATION_BEGIN = 122;
|
|
129
|
+
static readonly BLOCK_ANNOTATION_BEGIN = 123;
|
|
130
|
+
static readonly DOC_ANNOTATION = 124;
|
|
131
|
+
static readonly ANNOTATION = 125;
|
|
132
|
+
static readonly AMPER = 126;
|
|
133
|
+
static readonly ARROW = 127;
|
|
134
|
+
static readonly FAT_ARROW = 128;
|
|
135
|
+
static readonly OPAREN = 129;
|
|
136
|
+
static readonly CPAREN = 130;
|
|
137
|
+
static readonly OBRACK = 131;
|
|
138
|
+
static readonly CBRACK = 132;
|
|
139
|
+
static readonly OCURLY = 133;
|
|
140
|
+
static readonly CCURLY = 134;
|
|
141
|
+
static readonly DOUBLECOLON = 135;
|
|
142
|
+
static readonly TRIPLECOLON = 136;
|
|
143
|
+
static readonly EXCLAM = 137;
|
|
144
|
+
static readonly COLON = 138;
|
|
145
|
+
static readonly COMMA = 139;
|
|
146
|
+
static readonly DOT = 140;
|
|
147
|
+
static readonly LT = 141;
|
|
148
|
+
static readonly GT = 142;
|
|
149
|
+
static readonly EQ = 143;
|
|
150
|
+
static readonly NE = 144;
|
|
151
|
+
static readonly LTE = 145;
|
|
152
|
+
static readonly GTE = 146;
|
|
153
|
+
static readonly PLUS = 147;
|
|
154
|
+
static readonly MINUS = 148;
|
|
155
|
+
static readonly STAR = 149;
|
|
156
|
+
static readonly STARSTAR = 150;
|
|
157
|
+
static readonly SLASH = 151;
|
|
158
|
+
static readonly BAR = 152;
|
|
159
|
+
static readonly SEMI = 153;
|
|
160
|
+
static readonly NOT_MATCH = 154;
|
|
161
|
+
static readonly MATCH = 155;
|
|
162
|
+
static readonly PERCENT = 156;
|
|
163
|
+
static readonly DOUBLE_QMARK = 157;
|
|
164
|
+
static readonly QMARK = 158;
|
|
165
|
+
static readonly LITERAL_TIMESTAMP = 159;
|
|
166
|
+
static readonly LITERAL_HOUR = 160;
|
|
167
|
+
static readonly LITERAL_DAY = 161;
|
|
168
|
+
static readonly LITERAL_QUARTER = 162;
|
|
169
|
+
static readonly LITERAL_MONTH = 163;
|
|
170
|
+
static readonly LITERAL_WEEK = 164;
|
|
171
|
+
static readonly LITERAL_YEAR = 165;
|
|
172
|
+
static readonly IDENTIFIER = 166;
|
|
173
|
+
static readonly PERCENT_LITERAL = 167;
|
|
174
|
+
static readonly NUMERIC_LITERAL = 168;
|
|
175
|
+
static readonly INTEGER_LITERAL = 169;
|
|
176
|
+
static readonly BLOCK_COMMENT = 170;
|
|
177
|
+
static readonly COMMENT_TO_EOL = 171;
|
|
178
|
+
static readonly WHITE_SPACE = 172;
|
|
179
|
+
static readonly SQL_BEGIN = 173;
|
|
180
|
+
static readonly UNWATED_CHARS_TRAILING_NUMBERS = 174;
|
|
181
|
+
static readonly UNEXPECTED_CHAR = 175;
|
|
182
|
+
static readonly OPEN_CODE = 176;
|
|
183
|
+
static readonly SQL_END = 177;
|
|
184
|
+
static readonly BLOCK_ANNOTATION_END = 178;
|
|
185
|
+
static readonly BLOCK_ANNOTATION_TEXT = 179;
|
|
184
186
|
static readonly SQL_MODE = 1;
|
|
185
187
|
static readonly BLOCK_ANNOTATION_MODE = 2;
|
|
186
188
|
static readonly channelNames: string[];
|