@lcap/nasl 2.20.0-beta.3 → 2.20.0-beta.5
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/out/automate/engine/index.d.ts +1 -1
- package/out/automate/engine/index.js +2 -3
- package/out/automate/engine/index.js.map +1 -1
- package/out/automate/engine/uniqueName.d.ts +1 -1
- package/out/automate/engine/uniqueName.js +2 -2
- package/out/automate/engine/uniqueName.js.map +1 -1
- package/out/automate/engine/utils.js +4 -1
- package/out/automate/engine/utils.js.map +1 -1
- package/out/automate/template/myProcess.d.ts +1 -1
- package/out/automate/template/myProcess.js +2 -2
- package/out/automate/template/myProcess.js.map +1 -1
- package/out/bak/translator.js +14 -22
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.js +4 -1
- package/out/common/BaseNode.js.map +1 -1
- package/out/common/Command.d.ts +1 -0
- package/out/common/Command.js +5 -1
- package/out/common/Command.js.map +1 -1
- package/out/concepts/App__.d.ts +4 -0
- package/out/concepts/App__.js +30 -6
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Assignee__.js +4 -3
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/BatchAssignment__.js +3 -3
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BindAttribute__.d.ts +7 -0
- package/out/concepts/BindAttribute__.js +271 -39
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.d.ts +7 -0
- package/out/concepts/BindDirective__.js +215 -16
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindStyle__.d.ts +7 -0
- package/out/concepts/BindStyle__.js +192 -2
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/CallFunction__.js +22 -8
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.js +3 -2
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +3 -0
- package/out/concepts/CallLogic__.js +78 -89
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.js +20 -3
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/ConfigGroup__.d.ts +1 -0
- package/out/concepts/ConfigGroup__.js +13 -0
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigProperty__.d.ts +19 -0
- package/out/concepts/ConfigProperty__.js +63 -0
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.d.ts +1 -0
- package/out/concepts/Configuration__.js +13 -0
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/DataSource__.js +11 -3
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/Destination__.d.ts +1 -0
- package/out/concepts/Destination__.js +61 -7
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/EntityProperty__.js +9 -1
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +5 -5
- package/out/concepts/EnumItem__.js +6 -6
- package/out/concepts/Enum__.d.ts +20 -19
- package/out/concepts/Enum__.js +28 -1
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/ExternalDestination__.d.ts +1 -0
- package/out/concepts/ExternalDestination__.js +22 -4
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/ForEachStatement__.js +2 -0
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +2 -1
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Identifier__.js +16 -5
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/InterfaceParam__.js +9 -1
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/JSBlock__.js +5 -1
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +79 -79
- package/out/concepts/Logic__.js +30 -8
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/Match__.d.ts +2 -2
- package/out/concepts/Match__.js +29 -13
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +9 -0
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/Module__.d.ts +16 -0
- package/out/concepts/Module__.js +43 -0
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/NewComposite__.d.ts +3 -4
- package/out/concepts/NewComposite__.js +99 -116
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.d.ts +1 -0
- package/out/concepts/NewList__.js +22 -2
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +1 -0
- package/out/concepts/NewMap__.js +43 -11
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.js +40 -12
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/Param__.js +10 -2
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +2 -1
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.js +1 -1
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.js +1 -1
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/Process__.js +1 -0
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/Return__.js +13 -2
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/StringInterpolation__.js +14 -2
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/StringLiteral__.js +6 -6
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.js +9 -1
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +6 -3
- package/out/concepts/TypeAnnotation__.js +67 -13
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +1 -0
- package/out/concepts/ValidationRule__.js +53 -0
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.js +12 -1
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +1 -0
- package/out/concepts/ViewElement__.js +24 -1
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +1 -3
- package/out/concepts/View__.js +33 -12
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.collection.js +6 -1
- package/out/concepts/basics/stdlib/nasl.collection.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.configuration.js +3 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.core.d.ts +2 -0
- package/out/concepts/basics/stdlib/nasl.core.js +34 -0
- package/out/concepts/basics/stdlib/nasl.core.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +4 -2
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/basics/types/index.d.ts +1 -0
- package/out/concepts/basics/types/index.js +3 -1
- package/out/concepts/basics/types/index.js.map +1 -1
- package/out/concepts/index__.d.ts +0 -1
- package/out/concepts/index__.js +0 -1
- package/out/concepts/index__.js.map +1 -1
- package/out/enums/KEYWORDS.js +8 -0
- package/out/enums/KEYWORDS.js.map +1 -1
- package/out/generator/genBundleFiles.js +24 -5
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genReleaseBody.d.ts +3 -3
- package/out/generator/genReleaseBody.js +98 -23
- package/out/generator/genReleaseBody.js.map +1 -1
- package/out/generator/permission.d.ts +3 -10
- package/out/generator/permission.js +43 -21
- package/out/generator/permission.js.map +1 -1
- package/out/index.d.ts +1 -1
- package/out/index.js +2 -1
- package/out/index.js.map +1 -1
- package/out/server/entity2LogicNamespace.js +2 -20
- package/out/server/entity2LogicNamespace.js.map +1 -1
- package/out/server/extendBaseNode.js +16 -5
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/formatTsUtils.d.ts +2 -1
- package/out/server/formatTsUtils.js +40 -10
- package/out/server/formatTsUtils.js.map +1 -1
- package/out/server/getLogics.d.ts +2 -2
- package/out/server/getLogics.js +3 -3
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.d.ts +1 -0
- package/out/server/getMemberIdentifier.js +27 -1
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/index.js +1 -0
- package/out/server/index.js.map +1 -1
- package/out/server/naslServer.d.ts +7 -1
- package/out/server/naslServer.js +558 -62
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +109 -33
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.js +22 -2
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +1 -3
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +1 -3
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +2 -4
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genGetBlock.js +1 -1
- package/out/templator/genGetBlock.js.map +1 -1
- package/out/templator/genGridViewBlock.js +2 -2
- package/out/templator/genGridViewBlock.js.map +1 -1
- package/out/templator/genListViewBlock.js +7 -1
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genSelectBlock.js +1 -1
- package/out/templator/genSelectBlock.js.map +1 -1
- package/out/templator/genTableBlock.js +2 -2
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +2 -3
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/translator/index.js +4 -1
- package/out/translator/index.js.map +1 -1
- package/out/utils/traverse.js +8 -2
- package/out/utils/traverse.js.map +1 -1
- package/package.json +2 -2
- package/sandbox/stdlib/dist/nasl.logging.js +0 -0
- package/sandbox/stdlib/dist/nasl.util.js +0 -0
- package/sandbox/stdlib/nasl.collection.ts +1 -0
- package/sandbox/stdlib/nasl.core.ts +34 -0
- package/sandbox/stdlib/nasl.oql.ts +71 -15
- package/sandbox/stdlib/nasl.util.ts +9 -3
- package/src/automate/engine/dist/index.dev.js +517 -0
- package/src/automate/engine/index.js +2 -3
- package/src/automate/engine/uniqueName.js +2 -2
- package/src/automate/engine/utils.js +4 -2
- package/src/automate/template/myProcess.js +2 -2
- package/src/bak/translator.js +16 -25
- package/src/common/BaseNode.ts +3 -1
- package/src/common/Command.ts +4 -0
- package/src/common/dist/BaseNode.js +1101 -0
- package/src/concepts/App__.ts +36 -7
- package/src/concepts/Assignee__.ts +4 -3
- package/src/concepts/BatchAssignment__.ts +3 -3
- package/src/concepts/BindAttribute__.ts +301 -38
- package/src/concepts/BindDirective__.ts +205 -30
- package/src/concepts/BindStyle__.ts +188 -24
- package/src/concepts/CallFunction__.ts +55 -10
- package/src/concepts/CallInterface__.ts +3 -2
- package/src/concepts/CallLogic__.ts +110 -90
- package/src/concepts/CallQueryComponent__.ts +18 -3
- package/src/concepts/ConfigGroup__.ts +17 -4
- package/src/concepts/ConfigProperty__.ts +72 -4
- package/src/concepts/Configuration__.ts +14 -5
- package/src/concepts/DataSource__.ts +10 -3
- package/src/concepts/Destination__.ts +61 -7
- package/src/concepts/EntityProperty__.ts +7 -1
- package/src/concepts/EnumItem__.ts +6 -6
- package/src/concepts/Enum__.ts +22 -19
- package/src/concepts/ExternalDestination__.ts +29 -9
- package/src/concepts/ForEachStatement__.ts +2 -0
- package/src/concepts/Frontend__.ts +2 -1
- package/src/concepts/Identifier__.ts +16 -5
- package/src/concepts/InterfaceParam__.ts +7 -1
- package/src/concepts/JSBlock__.ts +3 -2
- package/src/concepts/Logic__.ts +110 -89
- package/src/concepts/Match__.ts +53 -14
- package/src/concepts/MemberExpression__.ts +6 -0
- package/src/concepts/Module__.ts +57 -0
- package/src/concepts/NewComposite__.ts +104 -131
- package/src/concepts/NewList__.ts +23 -2
- package/src/concepts/NewMap__.ts +48 -24
- package/src/concepts/OqlQueryComponent__.ts +40 -20
- package/src/concepts/Param__.ts +178 -176
- package/src/concepts/ProcessElement__.ts +2 -1
- package/src/concepts/ProcessOutcome__.ts +1 -1
- package/src/concepts/ProcessOutcomes__.ts +1 -1
- package/src/concepts/Process__.ts +1 -0
- package/src/concepts/Return__.ts +10 -2
- package/src/concepts/StringInterpolation__.ts +19 -7
- package/src/concepts/StringLiteral__.ts +7 -6
- package/src/concepts/StructureProperty__.ts +7 -1
- package/src/concepts/TypeAnnotation__.ts +102 -15
- package/src/concepts/ValidationRule__.ts +58 -9
- package/src/concepts/Variable__.ts +13 -1
- package/src/concepts/ViewElement__.ts +47 -2
- package/src/concepts/View__.ts +39 -18
- package/src/concepts/basics/stdlib/dist/nasl.util.js +1602 -0
- package/src/concepts/basics/stdlib/dist/reference2TypeAnnotationList.js +24 -0
- package/src/concepts/basics/stdlib/nasl.collection.ts +6 -1
- package/src/concepts/basics/stdlib/nasl.configuration.ts +3 -0
- package/src/concepts/basics/stdlib/nasl.core.ts +33 -2
- package/src/concepts/basics/stdlib/nasl.util.ts +4 -2
- package/src/concepts/basics/types/index.ts +1 -0
- package/src/concepts/dist/BindAttribute__.js +795 -0
- package/src/concepts/dist/BindEvent__.js +732 -0
- package/src/concepts/dist/CallFunction__.js +527 -0
- package/src/concepts/dist/CallLogic__.js +932 -0
- package/src/concepts/dist/Destination__.js +708 -0
- package/src/concepts/dist/ExternalDestination__.js +298 -0
- package/src/concepts/dist/Identifier__.js +311 -0
- package/src/concepts/dist/StringInterpolation__.js +231 -0
- package/src/concepts/dist/TypeAnnotation__.js +834 -0
- package/src/concepts/dist/ViewElement__.js +1692 -0
- package/src/concepts/dist/View__.js +1601 -0
- package/src/concepts/index__.ts +0 -1
- package/src/enums/KEYWORDS.ts +8 -0
- package/src/generator/dist/genBundleFiles.js +261 -0
- package/src/generator/dist/genMetaData.js +245 -0
- package/src/generator/dist/permission.js +405 -0
- package/src/generator/genBundleFiles.ts +24 -5
- package/src/generator/genReleaseBody.ts +77 -31
- package/src/generator/permission.ts +47 -21
- package/src/index.ts +1 -1
- package/src/server/entity2LogicNamespace.ts +2 -20
- package/src/server/extendBaseNode.ts +15 -5
- package/src/server/formatTsUtils.ts +41 -10
- package/src/server/getLogics.ts +4 -4
- package/src/server/getMemberIdentifier.ts +27 -1
- package/src/server/index.ts +2 -0
- package/src/server/naslServer.ts +555 -63
- package/src/server/translator.ts +96 -34
- package/src/service/storage/dist/init.js +579 -0
- package/src/service/storage/init.ts +23 -3
- package/src/templator/dist/genEditTableBlock.js +204 -0
- package/src/templator/dist/genGridViewBlock.js +265 -0
- package/src/templator/dist/genListViewBlock.js +84 -0
- package/src/templator/dist/genTableBlock.js +209 -0
- package/src/templator/dist/utils.js +527 -0
- package/src/templator/genCreateBlock.ts +1 -3
- package/src/templator/genCurdEditMultipleKeyBlock.ts +1 -3
- package/src/templator/genCurdMultipleKeyBlock.ts +2 -4
- package/src/templator/genGetBlock.ts +1 -1
- package/src/templator/genGridViewBlock.ts +3 -4
- package/src/templator/genListViewBlock.ts +9 -3
- package/src/templator/genSelectBlock.ts +1 -1
- package/src/templator/genTableBlock.ts +3 -3
- package/src/templator/genUpdateBlock.ts +2 -3
- package/src/translator/index.ts +3 -1
- package/src/utils/traverse.ts +10 -2
- package/ts-worker/lib/tsserver.js +10 -2
- package/ts-worker/package.json +1 -0
- package/ts-worker/webpack.config.js +11 -2
- package/out/concepts/ConstructArgument__.d.ts +0 -40
- package/out/concepts/ConstructArgument__.js +0 -108
- package/out/concepts/ConstructArgument__.js.map +0 -1
- package/out/concepts/Construct__.d.ts +0 -189
- package/out/concepts/Construct__.js +0 -340
- package/out/concepts/Construct__.js.map +0 -1
- package/out/templator/sql-parser/index.d.ts +0 -1
- package/out/templator/sql-parser/index.js +0 -228
- package/out/templator/sql-parser/index.js.map +0 -1
- package/out/templator/sql-parser/parser.js +0 -26664
- package/out/templator/sql-parser/parser.js.map +0 -1
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
|
-
var Construct_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.Construct = void 0;
|
|
14
|
-
const translator_1 = require("../translator");
|
|
15
|
-
const decorators_1 = require("../decorators");
|
|
16
|
-
const classMap_1 = __importDefault(require("../common/classMap"));
|
|
17
|
-
const TypeAnnotation__1 = __importDefault(require("./TypeAnnotation__"));
|
|
18
|
-
const ConstructArgument__1 = __importDefault(require("./ConstructArgument__"));
|
|
19
|
-
const MemberExpression__1 = __importDefault(require("./MemberExpression__"));
|
|
20
|
-
const LogicItem__1 = __importDefault(require("./LogicItem__"));
|
|
21
|
-
/**
|
|
22
|
-
* 构造器
|
|
23
|
-
*/
|
|
24
|
-
let Construct = Construct_1 = class Construct extends LogicItem__1.default {
|
|
25
|
-
/**
|
|
26
|
-
* 产品概念
|
|
27
|
-
*/
|
|
28
|
-
concept = 'Construct';
|
|
29
|
-
/**
|
|
30
|
-
* 类型参数
|
|
31
|
-
*/
|
|
32
|
-
typeArguments = null;
|
|
33
|
-
/**
|
|
34
|
-
* 构造属性
|
|
35
|
-
*/
|
|
36
|
-
arguments = [];
|
|
37
|
-
/**
|
|
38
|
-
* 右边项
|
|
39
|
-
*/
|
|
40
|
-
rightExpressions = [];
|
|
41
|
-
/**
|
|
42
|
-
* @param source 需要合并的部分参数
|
|
43
|
-
*/
|
|
44
|
-
constructor(source) {
|
|
45
|
-
source = Object.assign({}, Construct_1.getDefaultOptions(), source);
|
|
46
|
-
super(source);
|
|
47
|
-
super.subConstructor(source);
|
|
48
|
-
}
|
|
49
|
-
static from(source, parentNode, parentKey) {
|
|
50
|
-
return super.from(source, parentNode, parentKey);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* 设置右边项
|
|
54
|
-
*/
|
|
55
|
-
setRightExpressions(rightExpressions) {
|
|
56
|
-
const object = {
|
|
57
|
-
rightExpressions,
|
|
58
|
-
};
|
|
59
|
-
this.update({
|
|
60
|
-
...object,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
_insertTypeAnnotationAt(options, index) {
|
|
64
|
-
const typeAnnotationOptions = {};
|
|
65
|
-
const relationOptions = { parentNode: this, parentKey: 'typeArguments' };
|
|
66
|
-
let typeAnnotation;
|
|
67
|
-
if (options instanceof TypeAnnotation__1.default) {
|
|
68
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
69
|
-
typeAnnotation = options;
|
|
70
|
-
Object.assign(typeAnnotation, relationOptions);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
typeAnnotation = TypeAnnotation__1.default.from({
|
|
74
|
-
...typeAnnotationOptions,
|
|
75
|
-
...options,
|
|
76
|
-
}, this, 'typeArguments');
|
|
77
|
-
}
|
|
78
|
-
this.typeArguments.splice(index, 0, typeAnnotation);
|
|
79
|
-
return typeAnnotation;
|
|
80
|
-
}
|
|
81
|
-
insertTypeAnnotationAt(options, index) {
|
|
82
|
-
const node = this._insertTypeAnnotationAt(options, index);
|
|
83
|
-
node.create({
|
|
84
|
-
index,
|
|
85
|
-
parentNode: this,
|
|
86
|
-
parentKey: 'typeArguments',
|
|
87
|
-
});
|
|
88
|
-
return node;
|
|
89
|
-
}
|
|
90
|
-
_addTypeAnnotation(options) {
|
|
91
|
-
const index = this.typeArguments.length;
|
|
92
|
-
return this._insertTypeAnnotationAt(options, index);
|
|
93
|
-
}
|
|
94
|
-
addTypeAnnotation(options) {
|
|
95
|
-
const node = this._addTypeAnnotation(options);
|
|
96
|
-
const index = this.typeArguments.indexOf(node);
|
|
97
|
-
node.create({
|
|
98
|
-
index,
|
|
99
|
-
parentNode: this,
|
|
100
|
-
parentKey: 'typeArguments',
|
|
101
|
-
});
|
|
102
|
-
return node;
|
|
103
|
-
}
|
|
104
|
-
_insertConstructArgumentAt(options, index) {
|
|
105
|
-
const constructArgumentOptions = {};
|
|
106
|
-
const relationOptions = { parentNode: this, parentKey: 'arguments' };
|
|
107
|
-
let constructArgument;
|
|
108
|
-
if (options instanceof ConstructArgument__1.default) {
|
|
109
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
110
|
-
constructArgument = options;
|
|
111
|
-
Object.assign(constructArgument, relationOptions);
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
constructArgument = ConstructArgument__1.default.from({
|
|
115
|
-
...constructArgumentOptions,
|
|
116
|
-
...options,
|
|
117
|
-
}, this, 'arguments');
|
|
118
|
-
}
|
|
119
|
-
this.arguments.splice(index, 0, constructArgument);
|
|
120
|
-
return constructArgument;
|
|
121
|
-
}
|
|
122
|
-
insertConstructArgumentAt(options, index) {
|
|
123
|
-
const node = this._insertConstructArgumentAt(options, index);
|
|
124
|
-
node.create({
|
|
125
|
-
index,
|
|
126
|
-
parentNode: this,
|
|
127
|
-
parentKey: 'arguments',
|
|
128
|
-
});
|
|
129
|
-
return node;
|
|
130
|
-
}
|
|
131
|
-
_addConstructArgument(options) {
|
|
132
|
-
const index = this.arguments.length;
|
|
133
|
-
return this._insertConstructArgumentAt(options, index);
|
|
134
|
-
}
|
|
135
|
-
addConstructArgument(options) {
|
|
136
|
-
const node = this._addConstructArgument(options);
|
|
137
|
-
const index = this.arguments.indexOf(node);
|
|
138
|
-
node.create({
|
|
139
|
-
index,
|
|
140
|
-
parentNode: this,
|
|
141
|
-
parentKey: 'arguments',
|
|
142
|
-
});
|
|
143
|
-
return node;
|
|
144
|
-
}
|
|
145
|
-
_insertMemberExpressionAt(options, index) {
|
|
146
|
-
const memberExpressionOptions = {};
|
|
147
|
-
const relationOptions = { parentNode: this, parentKey: 'rightExpressions' };
|
|
148
|
-
let memberExpression;
|
|
149
|
-
if (options instanceof MemberExpression__1.default) {
|
|
150
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
151
|
-
memberExpression = options;
|
|
152
|
-
Object.assign(memberExpression, relationOptions);
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
memberExpression = MemberExpression__1.default.from({
|
|
156
|
-
...memberExpressionOptions,
|
|
157
|
-
...options,
|
|
158
|
-
}, this, 'rightExpressions');
|
|
159
|
-
}
|
|
160
|
-
this.rightExpressions.splice(index, 0, memberExpression);
|
|
161
|
-
return memberExpression;
|
|
162
|
-
}
|
|
163
|
-
insertMemberExpressionAt(options, index) {
|
|
164
|
-
const node = this._insertMemberExpressionAt(options, index);
|
|
165
|
-
node.create({
|
|
166
|
-
index,
|
|
167
|
-
parentNode: this,
|
|
168
|
-
parentKey: 'rightExpressions',
|
|
169
|
-
});
|
|
170
|
-
return node;
|
|
171
|
-
}
|
|
172
|
-
_addMemberExpression(options) {
|
|
173
|
-
const index = this.rightExpressions.length;
|
|
174
|
-
return this._insertMemberExpressionAt(options, index);
|
|
175
|
-
}
|
|
176
|
-
addMemberExpression(options) {
|
|
177
|
-
const node = this._addMemberExpression(options);
|
|
178
|
-
const index = this.rightExpressions.indexOf(node);
|
|
179
|
-
node.create({
|
|
180
|
-
index,
|
|
181
|
-
parentNode: this,
|
|
182
|
-
parentKey: 'rightExpressions',
|
|
183
|
-
});
|
|
184
|
-
return node;
|
|
185
|
-
}
|
|
186
|
-
removeTypeAnnotation(options) {
|
|
187
|
-
let typeAnnotation = options;
|
|
188
|
-
return typeAnnotation.delete();
|
|
189
|
-
}
|
|
190
|
-
__removeTypeAnnotation(typeAnnotation) {
|
|
191
|
-
const parentKey = typeAnnotation.parentKey;
|
|
192
|
-
const params = {
|
|
193
|
-
parentNode: this,
|
|
194
|
-
parentKey,
|
|
195
|
-
index: -1,
|
|
196
|
-
object: null,
|
|
197
|
-
oldObject: typeAnnotation,
|
|
198
|
-
};
|
|
199
|
-
if (parentKey) {
|
|
200
|
-
params.parentKey = parentKey;
|
|
201
|
-
if (Array.isArray(this[parentKey])) {
|
|
202
|
-
const index = this[parentKey].indexOf(typeAnnotation);
|
|
203
|
-
~index && this[parentKey].splice(index, 1);
|
|
204
|
-
params.index = index;
|
|
205
|
-
}
|
|
206
|
-
else if (this[parentKey] === typeAnnotation) {
|
|
207
|
-
params.index = 0;
|
|
208
|
-
this[parentKey] = undefined;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return params;
|
|
212
|
-
}
|
|
213
|
-
removeConstructArgument(options) {
|
|
214
|
-
let constructArgument = options;
|
|
215
|
-
return constructArgument.delete();
|
|
216
|
-
}
|
|
217
|
-
__removeConstructArgument(constructArgument) {
|
|
218
|
-
const parentKey = constructArgument.parentKey;
|
|
219
|
-
const params = {
|
|
220
|
-
parentNode: this,
|
|
221
|
-
parentKey,
|
|
222
|
-
index: -1,
|
|
223
|
-
object: null,
|
|
224
|
-
oldObject: constructArgument,
|
|
225
|
-
};
|
|
226
|
-
if (parentKey) {
|
|
227
|
-
params.parentKey = parentKey;
|
|
228
|
-
if (Array.isArray(this[parentKey])) {
|
|
229
|
-
const index = this[parentKey].indexOf(constructArgument);
|
|
230
|
-
~index && this[parentKey].splice(index, 1);
|
|
231
|
-
params.index = index;
|
|
232
|
-
}
|
|
233
|
-
else if (this[parentKey] === constructArgument) {
|
|
234
|
-
params.index = 0;
|
|
235
|
-
this[parentKey] = undefined;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
return params;
|
|
239
|
-
}
|
|
240
|
-
removeMemberExpression(options) {
|
|
241
|
-
let memberExpression = options;
|
|
242
|
-
return memberExpression.delete();
|
|
243
|
-
}
|
|
244
|
-
__removeLogicItem(logicItem) {
|
|
245
|
-
const parentKey = logicItem.parentKey;
|
|
246
|
-
const params = {
|
|
247
|
-
parentNode: this,
|
|
248
|
-
parentKey,
|
|
249
|
-
index: -1,
|
|
250
|
-
object: null,
|
|
251
|
-
oldObject: logicItem,
|
|
252
|
-
};
|
|
253
|
-
if (parentKey) {
|
|
254
|
-
params.parentKey = parentKey;
|
|
255
|
-
if (Array.isArray(this[parentKey])) {
|
|
256
|
-
const index = this[parentKey].indexOf(logicItem);
|
|
257
|
-
~index && this[parentKey].splice(index, 1);
|
|
258
|
-
params.index = index;
|
|
259
|
-
}
|
|
260
|
-
else if (this[parentKey] === logicItem) {
|
|
261
|
-
params.index = 0;
|
|
262
|
-
this[parentKey] = undefined;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
return params;
|
|
266
|
-
}
|
|
267
|
-
//================================================================================
|
|
268
|
-
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
269
|
-
// 自动生成的代码已结束。下面可以手动编写。
|
|
270
|
-
//================================================================================
|
|
271
|
-
toJS(state) {
|
|
272
|
-
let code = '';
|
|
273
|
-
this.typeArguments.forEach((typeArgument) => {
|
|
274
|
-
const { typeKind } = typeArgument;
|
|
275
|
-
if (typeKind === 'reference') {
|
|
276
|
-
const scope = this.view ? 'this' : 'Vue.prototype';
|
|
277
|
-
const defaultValue = {};
|
|
278
|
-
this.arguments.forEach(({ keyword, expressionIndex }) => {
|
|
279
|
-
const rightExpression = this.rightExpressions[expressionIndex];
|
|
280
|
-
if (rightExpression) {
|
|
281
|
-
defaultValue[keyword] = rightExpression.toJS();
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
code += `${scope}.$genInitFromSchema(${JSON.stringify(typeArgument)}, ${JSON.stringify(defaultValue)})`;
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
code += typeArgument.toJS();
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
return code;
|
|
291
|
-
}
|
|
292
|
-
toEmbeddedTS(state) {
|
|
293
|
-
let code = 'function(){\n';
|
|
294
|
-
if (!this.typeArguments.length) {
|
|
295
|
-
code += `return nasl.util.New<__IDENTIFIER__>()}()`;
|
|
296
|
-
return code;
|
|
297
|
-
}
|
|
298
|
-
// 当前构造器左边只存在有一个值
|
|
299
|
-
const typeArgument = this.typeArguments[0];
|
|
300
|
-
if (typeArgument.typeKind === 'reference') {
|
|
301
|
-
code += `let leftArgument: ${typeArgument.toEmbeddedTS()}\n`;
|
|
302
|
-
this.arguments.forEach((argument) => {
|
|
303
|
-
const { keyword, expressionIndex } = argument;
|
|
304
|
-
code += `leftArgument.${keyword}`;
|
|
305
|
-
code += ' = ';
|
|
306
|
-
code += this.rightExpressions[expressionIndex] ? this.rightExpressions[expressionIndex].toEmbeddedTS() : '__RIGHT__';
|
|
307
|
-
code += ';\n';
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
code += `return nasl.util.New(${typeArgument.toEmbeddedTS()})\n`;
|
|
311
|
-
code += `}();`;
|
|
312
|
-
return code;
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
__decorate([
|
|
316
|
-
(0, decorators_1.property)()
|
|
317
|
-
], Construct.prototype, "concept", void 0);
|
|
318
|
-
__decorate([
|
|
319
|
-
(0, decorators_1.property)('TypeAnnotation')
|
|
320
|
-
], Construct.prototype, "typeArguments", void 0);
|
|
321
|
-
__decorate([
|
|
322
|
-
(0, decorators_1.property)('ConstructArgument')
|
|
323
|
-
], Construct.prototype, "arguments", void 0);
|
|
324
|
-
__decorate([
|
|
325
|
-
(0, decorators_1.property)('MemberExpression')
|
|
326
|
-
], Construct.prototype, "rightExpressions", void 0);
|
|
327
|
-
__decorate([
|
|
328
|
-
(0, translator_1.withSourceMap)()
|
|
329
|
-
], Construct.prototype, "toEmbeddedTS", null);
|
|
330
|
-
Construct = Construct_1 = __decorate([
|
|
331
|
-
(0, decorators_1.concept)('构造器')
|
|
332
|
-
], Construct);
|
|
333
|
-
exports.Construct = Construct;
|
|
334
|
-
classMap_1.default.Construct = Construct;
|
|
335
|
-
exports.default = Construct;
|
|
336
|
-
//================================================================================
|
|
337
|
-
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
338
|
-
// 自动生成的代码已结束。下面可以手动编写。
|
|
339
|
-
//================================================================================
|
|
340
|
-
//# sourceMappingURL=Construct__.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Construct__.js","sourceRoot":"","sources":["../../src/concepts/Construct__.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,8CAA2E;AAQ3E,8CAAkE;AAKlE,kEAA0C;AAC1C,yEAAgD;AAChD,+EAAsD;AACtD,6EAAoD;AACpD,+DAAsC;AAEtC;;GAEG;AAEH,IAAa,SAAS,iBAAtB,MAAa,SAAU,SAAQ,oBAAS;IACpC;;OAEG;IAEH,OAAO,GAAgB,WAAW,CAAC;IAEnC;;OAEG;IAEH,aAAa,GAA2B,IAAI,CAAC;IAE7C;;OAEG;IAEH,SAAS,GAA6B,EAAE,CAAC;IAEzC;;OAEG;IAEH,gBAAgB,GAA4B,EAAE,CAAC;IAI/C;;OAEG;IACH,YAAY,MAA2B;QACnC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,WAAS,CAAC,iBAAiB,EAAE,EAAE,MAAM,CAAC,CAAC;QAClE,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAW,EAAE,UAAgB,EAAE,SAAkB;QACzD,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAc,CAAC;IAClE,CAAC;IAGD;;OAEG;IACH,mBAAmB,CAAC,gBAAyC;QACzD,MAAM,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AAgB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;gBACrH,IAAI,IAAI,KAAK,CAAC;YAClB,CAAC,CAAC,CAAC;SACN;QAED,IAAI,IAAI,wBAAwB,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC;QACjE,IAAI,IAAI,MAAM,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;CAKJ,CAAA;AAlhBG;IADC,IAAA,qBAAQ,GAAE;0CACwB;AAMnC;IADC,IAAA,qBAAQ,EAAC,gBAAgB,CAAC;gDACkB;AAM7C;IADC,IAAA,qBAAQ,EAAC,mBAAmB,CAAC;4CACW;AAMzC;IADC,IAAA,qBAAQ,EAAC,kBAAkB,CAAC;mDACkB;AAqe/C;IADC,IAAA,0BAAa,GAAE;6CAuBf;AAlhBQ,SAAS;IADrB,IAAA,oBAAO,EAAC,KAAK,CAAC;GACF,SAAS,CAuhBrB;AAvhBY,8BAAS;AAyhBtB,kBAAQ,CAAC,SAAS,GAAG,SAAS,CAAC;AAC/B,kBAAe,SAAS,CAAC;AACzB,kFAAkF;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function parse(source: any, start: any, dataSource: any): any;
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parse = void 0;
|
|
4
|
-
const Parser = require('./parser');
|
|
5
|
-
/*
|
|
6
|
-
|
|
7
|
-
FROM(new Collection<[app.Student]>()
|
|
8
|
-
.LEFT_JOIN(new Collection<[app.School]>())
|
|
9
|
-
.ON((student, school) => student.schoolId === school.id))
|
|
10
|
-
.WHERE((student, school) => IN(student.age, [10, 20]))
|
|
11
|
-
.ORDER_BY((student, school) => student.name, "ASC")
|
|
12
|
-
.PAGINATE(page, size)
|
|
13
|
-
.SELECT_PAGE_OF((student, school) => ({
|
|
14
|
-
school,
|
|
15
|
-
student,
|
|
16
|
-
}));
|
|
17
|
-
*/
|
|
18
|
-
/*
|
|
19
|
-
sourcemapItem {
|
|
20
|
-
sqlLoction: {},
|
|
21
|
-
nasqLocation: {},
|
|
22
|
-
}
|
|
23
|
-
*/
|
|
24
|
-
function transformer(root, startOffset = 0, dataSource = 'defaultDS') {
|
|
25
|
-
const sourceMap = [];
|
|
26
|
-
const argmentsStack = [];
|
|
27
|
-
const newLine = () => '\n';
|
|
28
|
-
const indent = (tabSize) => ' '.repeat(tabSize * 4);
|
|
29
|
-
let code = '';
|
|
30
|
-
function currentArgs() {
|
|
31
|
-
return argmentsStack[argmentsStack.length - 1];
|
|
32
|
-
}
|
|
33
|
-
function argumentList() {
|
|
34
|
-
const args = currentArgs();
|
|
35
|
-
const lang = args.map((a) => a.table).join(', ');
|
|
36
|
-
code += `(${lang})`;
|
|
37
|
-
}
|
|
38
|
-
function returnList() {
|
|
39
|
-
const args = currentArgs();
|
|
40
|
-
const lang = args.map((a) => a.table).join(', ');
|
|
41
|
-
code += `({${lang}})`;
|
|
42
|
-
}
|
|
43
|
-
function ColumnRef(ast, refName) {
|
|
44
|
-
const { table, column, location, } = ast;
|
|
45
|
-
const start = code.length;
|
|
46
|
-
const c = `${refName || table}.${column}`;
|
|
47
|
-
code += c;
|
|
48
|
-
sourceMap.push({
|
|
49
|
-
sqlLoction: location,
|
|
50
|
-
nasqLocation: {
|
|
51
|
-
rawStart: start,
|
|
52
|
-
start: start + startOffset,
|
|
53
|
-
length: c.length,
|
|
54
|
-
code: c,
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function Conllection(tableDesc) {
|
|
59
|
-
const { location, table, } = tableDesc;
|
|
60
|
-
code += `new nasl.langUtil.Collection<[app.dataSources.${dataSource}.entities.`;
|
|
61
|
-
const start = code.length;
|
|
62
|
-
code += table;
|
|
63
|
-
sourceMap.push({
|
|
64
|
-
sqlLoction: location,
|
|
65
|
-
nasqLocation: {
|
|
66
|
-
rawStart: start,
|
|
67
|
-
start: start + startOffset,
|
|
68
|
-
length: table.length,
|
|
69
|
-
code: table,
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
code += ']>()';
|
|
73
|
-
}
|
|
74
|
-
function BasicExpr(ast, refName) {
|
|
75
|
-
if (ast.type === 'expr_list') {
|
|
76
|
-
ast.value.forEach((v, idx) => {
|
|
77
|
-
if (v.ast) {
|
|
78
|
-
SQLSyntx(v);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
BasicExpr(v, refName);
|
|
82
|
-
if (idx !== ast.value.length - 1) {
|
|
83
|
-
code += ',';
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
else if (ast.type === 'column_ref') {
|
|
89
|
-
ColumnRef(ast, refName);
|
|
90
|
-
}
|
|
91
|
-
else if (ast.type === 'single_quote_string') {
|
|
92
|
-
code += `'${ast.value}'`;
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
code += ast.value;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
function Operator(op) {
|
|
99
|
-
if (op === '=') {
|
|
100
|
-
code += '===';
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
code += op;
|
|
104
|
-
}
|
|
105
|
-
function binaryExp(ast) {
|
|
106
|
-
const { operator, left, right, } = ast;
|
|
107
|
-
const args = currentArgs();
|
|
108
|
-
argumentList();
|
|
109
|
-
code += ` => `;
|
|
110
|
-
if (operator === 'IN') {
|
|
111
|
-
code += 'IN(';
|
|
112
|
-
BasicExpr(left, args[0]?.table);
|
|
113
|
-
code += ', [';
|
|
114
|
-
BasicExpr(right, args[1]?.table);
|
|
115
|
-
code += '])';
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
BasicExpr(left, args[0]?.table);
|
|
119
|
-
Operator(operator);
|
|
120
|
-
BasicExpr(right, args[1]?.table);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function FromSyntax(ast) {
|
|
124
|
-
code += 'nasl.langUtil.FROM(';
|
|
125
|
-
ast.forEach((tableDesc) => {
|
|
126
|
-
const { table, join, on, } = tableDesc;
|
|
127
|
-
if (join || on) {
|
|
128
|
-
if (join) {
|
|
129
|
-
code += `.LEFT_JOIN(`;
|
|
130
|
-
Conllection(tableDesc);
|
|
131
|
-
code += `)`;
|
|
132
|
-
}
|
|
133
|
-
if (on) {
|
|
134
|
-
const { type } = on;
|
|
135
|
-
if (type === 'binary_expr') {
|
|
136
|
-
code += `.ON(`;
|
|
137
|
-
binaryExp(on);
|
|
138
|
-
code += `)`;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
Conllection(tableDesc);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
code += ')';
|
|
147
|
-
}
|
|
148
|
-
function WhereSyntax(ast) {
|
|
149
|
-
code += '.WHERE(';
|
|
150
|
-
const { type } = ast;
|
|
151
|
-
if (type === 'binary_expr') {
|
|
152
|
-
binaryExp(ast);
|
|
153
|
-
}
|
|
154
|
-
code += ')';
|
|
155
|
-
}
|
|
156
|
-
function ExprSyntax(expr) {
|
|
157
|
-
const type = expr.type;
|
|
158
|
-
if (type === 'binary_expr') {
|
|
159
|
-
return binaryExp(expr);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
function OrderBySyntax(ast) {
|
|
163
|
-
code += '.ORDER_BY(';
|
|
164
|
-
argumentList();
|
|
165
|
-
code += ' => ';
|
|
166
|
-
const { expr, type } = ast[0];
|
|
167
|
-
if (expr.type === 'column_ref') {
|
|
168
|
-
ColumnRef(expr);
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
ExprSyntax(expr);
|
|
172
|
-
}
|
|
173
|
-
code += `, '${type.toUpperCase()}')`;
|
|
174
|
-
}
|
|
175
|
-
function SQLSyntx(root) {
|
|
176
|
-
const { ast } = root;
|
|
177
|
-
const sql_op = ast.type;
|
|
178
|
-
const sql_arguments = root.tableList.map((arg) => {
|
|
179
|
-
const meta = arg.split('::');
|
|
180
|
-
return {
|
|
181
|
-
table: meta[2],
|
|
182
|
-
};
|
|
183
|
-
});
|
|
184
|
-
argmentsStack.push(sql_arguments);
|
|
185
|
-
if (ast.from) {
|
|
186
|
-
FromSyntax(ast.from);
|
|
187
|
-
}
|
|
188
|
-
if (ast.where) {
|
|
189
|
-
WhereSyntax(ast.where);
|
|
190
|
-
}
|
|
191
|
-
if (ast.orderby) {
|
|
192
|
-
OrderBySyntax(ast.orderby);
|
|
193
|
-
}
|
|
194
|
-
code += '.SELECT(';
|
|
195
|
-
argumentList();
|
|
196
|
-
code += ' => ';
|
|
197
|
-
returnList();
|
|
198
|
-
code += ')';
|
|
199
|
-
argmentsStack.pop();
|
|
200
|
-
}
|
|
201
|
-
SQLSyntx(root);
|
|
202
|
-
return {
|
|
203
|
-
NASQ: code,
|
|
204
|
-
sourceMap,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
function parse(source, start, dataSource) {
|
|
208
|
-
const parseObj = Parser.parse(source);
|
|
209
|
-
console.log(parseObj);
|
|
210
|
-
// const result = transformer(parseObj, start, dataSource);
|
|
211
|
-
// console.log(result.NASQ);
|
|
212
|
-
// return result;
|
|
213
|
-
return {
|
|
214
|
-
...parseObj,
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
exports.parse = parse;
|
|
218
|
-
const sql1 = `SELECT * FROM student
|
|
219
|
-
LEFT JOIN school
|
|
220
|
-
ON student.schoolId = school.id
|
|
221
|
-
WHERE student.age > 20
|
|
222
|
-
ORDER BY student.name`;
|
|
223
|
-
// const sql2 = `SELECT * FROM bbc
|
|
224
|
-
// WHERE region IN
|
|
225
|
-
// (SELECT region FROM bbc
|
|
226
|
-
// WHERE name IN ('India','Iran'))`
|
|
227
|
-
// parse(sql1);
|
|
228
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templator/sql-parser/index.js"],"names":[],"mappings":";;;AAAA,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEnC;;;;;;;;;;;;EAYE;AACF;;;;;EAKE;AACF,SAAS,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,CAAC,EAAE,UAAU,GAAG,WAAW;IAChE,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,MAAM,aAAa,GAAG,EAAE,CAAC;IACzB,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IAC3B,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;IACpD,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,SAAS,WAAW;QAChB,OAAO,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnD,CAAC;IACD,SAAS,YAAY;QACjB,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,IAAI,IAAI,IAAI,GAAG,CAAC;IACxB,CAAC;IAED,SAAS,UAAU;QACf,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC;IAC1B,CAAC;IAED,SAAS,SAAS,CAAC,GAAG,EAAE,OA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