@finos/legend-graph 0.2.2 → 0.3.1
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/CHANGELOG.md +34 -0
- package/lib/GraphManagerStateProvider.d.ts +3 -2
- package/lib/GraphManagerStateProvider.d.ts.map +1 -1
- package/lib/GraphManagerStateProvider.js +2 -2
- package/lib/GraphManagerStateProvider.js.map +1 -1
- package/lib/GraphManagerTestUtils.d.ts +3 -2
- package/lib/GraphManagerTestUtils.d.ts.map +1 -1
- package/lib/GraphManagerTestUtils.js +1 -1
- package/lib/GraphManagerTestUtils.js.map +1 -1
- package/lib/MetaModelConst.d.ts +7 -0
- package/lib/MetaModelConst.d.ts.map +1 -1
- package/lib/MetaModelConst.js +8 -0
- package/lib/MetaModelConst.js.map +1 -1
- package/lib/graph/PureGraphPlugin.d.ts +2 -0
- package/lib/graph/PureGraphPlugin.d.ts.map +1 -1
- package/lib/graph/PureGraphPlugin.js +3 -0
- package/lib/graph/PureGraphPlugin.js.map +1 -1
- package/lib/graphManager/AbstractPureGraphManager.d.ts +5 -9
- package/lib/graphManager/AbstractPureGraphManager.d.ts.map +1 -1
- package/lib/graphManager/AbstractPureGraphManager.js.map +1 -1
- package/lib/graphManager/CorePureGraphManagerPlugin.d.ts +0 -2
- package/lib/graphManager/CorePureGraphManagerPlugin.d.ts.map +1 -1
- package/lib/graphManager/CorePureGraphManagerPlugin.js +1 -4
- package/lib/graphManager/CorePureGraphManagerPlugin.js.map +1 -1
- package/lib/graphManager/PureGraphManagerPlugin.d.ts +2 -0
- package/lib/graphManager/PureGraphManagerPlugin.d.ts.map +1 -1
- package/lib/graphManager/PureGraphManagerPlugin.js +3 -0
- package/lib/graphManager/PureGraphManagerPlugin.js.map +1 -1
- package/lib/graphManager/action/SourceInformationHelper.d.ts.map +1 -1
- package/lib/graphManager/action/SourceInformationHelper.js +3 -1
- package/lib/graphManager/action/SourceInformationHelper.js.map +1 -1
- package/lib/graphManager/action/query/Query.d.ts +11 -0
- package/lib/graphManager/action/query/Query.d.ts.map +1 -1
- package/lib/graphManager/action/query/Query.js +13 -0
- package/lib/graphManager/action/query/Query.js.map +1 -1
- package/lib/graphManager/action/query/QuerySearchSpecification.d.ts +29 -0
- package/lib/graphManager/action/query/QuerySearchSpecification.d.ts.map +1 -0
- package/lib/graphManager/action/query/QuerySearchSpecification.js +28 -0
- package/lib/graphManager/action/query/QuerySearchSpecification.js.map +1 -0
- package/lib/helpers/DomainHelper.d.ts +20 -0
- package/lib/helpers/DomainHelper.d.ts.map +1 -0
- package/lib/helpers/DomainHelper.js +37 -0
- package/lib/helpers/DomainHelper.js.map +1 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.d.ts +2 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.js +7 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.js.map +1 -1
- package/lib/models/protocols/pure/PureProtocolProcessorPlugin.d.ts +2 -0
- package/lib/models/protocols/pure/PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/models/protocols/pure/PureProtocolProcessorPlugin.js +3 -0
- package/lib/models/protocols/pure/PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/models/protocols/pure/v1/V1_Core_SystemModels.json +7 -0
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.d.ts +6 -9
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.js +5 -5
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.d.ts +2 -6
- package/lib/models/protocols/pure/v1/engine/V1_Engine.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.js +14 -5
- package/lib/models/protocols/pure/v1/engine/V1_Engine.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.d.ts +3 -0
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.js +62 -2
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.d.ts +4 -8
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.js +1 -6
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecuteInput.d.ts +1 -1
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecuteInput.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecuteInput.js +3 -3
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecuteInput.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/generation/V1_FileGenerationInput.d.ts +3 -3
- package/lib/models/protocols/pure/v1/engine/generation/V1_FileGenerationInput.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/generation/V1_FileGenerationInput.js +2 -2
- package/lib/models/protocols/pure/v1/engine/generation/V1_FileGenerationInput.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/grammar/V1_JsonToGrammarInput.d.ts +1 -1
- package/lib/models/protocols/pure/v1/engine/grammar/V1_JsonToGrammarInput.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/grammar/V1_JsonToGrammarInput.js +3 -3
- package/lib/models/protocols/pure/v1/engine/grammar/V1_JsonToGrammarInput.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/query/V1_Query.d.ts +7 -3
- package/lib/models/protocols/pure/v1/engine/query/V1_Query.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/query/V1_Query.js +9 -4
- package/lib/models/protocols/pure/v1/engine/query/V1_Query.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/query/V1_QuerySearchSpecification.d.ts +33 -0
- package/lib/models/protocols/pure/v1/engine/query/V1_QuerySearchSpecification.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/engine/query/V1_QuerySearchSpecification.js +43 -0
- package/lib/models/protocols/pure/v1/engine/query/V1_QuerySearchSpecification.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/context/V1_PureModelContextText.d.ts +22 -0
- package/lib/models/protocols/pure/v1/model/context/V1_PureModelContextText.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/model/context/V1_PureModelContextText.js +21 -0
- package/lib/models/protocols/pure/v1/model/context/V1_PureModelContextText.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.d.ts +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.js +2 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.js +1 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.js +1 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.js +2 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.js +1 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.js +9 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.d.ts +3 -2
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.js +15 -3
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.js +1 -0
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.js +3 -3
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper.js +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.js +3 -13
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MilestoningSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MilestoningSerializationHelper.js +5 -5
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MilestoningSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/executionPlan/V1_ExecutionPlanSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/executionPlan/V1_ExecutionPlanSerializationHelper.js +3 -3
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/executionPlan/V1_ExecutionPlanSerializationHelper.js.map +1 -1
- package/package.json +8 -8
- package/src/GraphManagerStateProvider.tsx +2 -6
- package/src/GraphManagerTestUtils.tsx +2 -4
- package/src/MetaModelConst.ts +9 -0
- package/src/graph/PureGraphPlugin.ts +5 -0
- package/src/graphManager/AbstractPureGraphManager.ts +7 -9
- package/src/graphManager/CorePureGraphManagerPlugin.ts +1 -6
- package/src/graphManager/PureGraphManagerPlugin.ts +5 -0
- package/src/graphManager/action/SourceInformationHelper.ts +3 -1
- package/src/graphManager/action/query/Query.ts +15 -0
- package/src/graphManager/action/query/QuerySearchSpecification.ts +31 -0
- package/src/helpers/DomainHelper.ts +53 -0
- package/src/index.ts +3 -4
- package/src/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.ts +8 -0
- package/src/models/protocols/pure/PureProtocolProcessorPlugin.ts +5 -0
- package/src/models/protocols/pure/v1/V1_Core_SystemModels.json +7 -0
- package/src/models/protocols/pure/v1/V1_PureGraphManager.ts +14 -11
- package/src/models/protocols/pure/v1/engine/V1_Engine.ts +25 -12
- package/src/models/protocols/pure/v1/engine/V1_EngineHelper.ts +92 -1
- package/src/models/protocols/pure/v1/engine/V1_EngineServerClient.ts +9 -14
- package/src/models/protocols/pure/v1/engine/execution/V1_ExecuteInput.ts +3 -3
- package/src/models/protocols/pure/v1/engine/generation/V1_FileGenerationInput.ts +5 -5
- package/src/models/protocols/pure/v1/engine/grammar/V1_JsonToGrammarInput.ts +3 -4
- package/src/models/protocols/pure/v1/engine/query/V1_Query.ts +17 -4
- package/src/models/protocols/pure/v1/engine/query/V1_QuerySearchSpecification.ts +62 -0
- package/src/models/protocols/pure/v1/model/context/V1_PureModelContextText.ts +23 -0
- package/src/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.ts +2 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.ts +1 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.ts +1 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.ts +2 -1
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.ts +1 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.ts +14 -1
- package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.ts +19 -5
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.ts +1 -0
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.ts +4 -6
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper.ts +1 -4
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.ts +4 -14
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MilestoningSerializationHelper.ts +10 -11
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/executionPlan/V1_ExecutionPlanSerializationHelper.ts +4 -4
- package/tsconfig.json +4 -0
|
@@ -14,8 +14,17 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
|
|
17
|
+
import {
|
|
18
|
+
NullphobicSerializationFactory,
|
|
19
|
+
usingModelSchema,
|
|
20
|
+
} from '@finos/legend-shared';
|
|
21
|
+
import { createModelSchema, list, optional, primitive } from 'serializr';
|
|
22
|
+
import type { V1_StereotypePtr } from '../../model/packageableElements/domain/V1_StereotypePtr';
|
|
23
|
+
import type { V1_TaggedValue } from '../../model/packageableElements/domain/V1_TaggedValue';
|
|
24
|
+
import {
|
|
25
|
+
V1_stereotypePtrSchema,
|
|
26
|
+
V1_taggedValueSchema,
|
|
27
|
+
} from '../../transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper';
|
|
19
28
|
|
|
20
29
|
export class V1_Query {
|
|
21
30
|
name!: string;
|
|
@@ -27,8 +36,10 @@ export class V1_Query {
|
|
|
27
36
|
runtime!: string;
|
|
28
37
|
content!: string;
|
|
29
38
|
owner?: string | undefined;
|
|
39
|
+
taggedValues?: V1_TaggedValue[] | undefined;
|
|
40
|
+
stereotypes?: V1_StereotypePtr[] | undefined;
|
|
30
41
|
|
|
31
|
-
static readonly serialization = new
|
|
42
|
+
static readonly serialization = new NullphobicSerializationFactory(
|
|
32
43
|
createModelSchema(V1_Query, {
|
|
33
44
|
artifactId: primitive(),
|
|
34
45
|
content: primitive(),
|
|
@@ -38,6 +49,8 @@ export class V1_Query {
|
|
|
38
49
|
name: primitive(),
|
|
39
50
|
owner: optional(primitive()),
|
|
40
51
|
runtime: primitive(),
|
|
52
|
+
stereotypes: optional(list(usingModelSchema(V1_stereotypePtrSchema))),
|
|
53
|
+
taggedValues: optional(list(usingModelSchema(V1_taggedValueSchema))),
|
|
41
54
|
versionId: primitive(),
|
|
42
55
|
}),
|
|
43
56
|
);
|
|
@@ -51,7 +64,7 @@ export class V1_LightQuery {
|
|
|
51
64
|
artifactId!: string;
|
|
52
65
|
versionId!: string;
|
|
53
66
|
|
|
54
|
-
static readonly serialization = new
|
|
67
|
+
static readonly serialization = new NullphobicSerializationFactory(
|
|
55
68
|
createModelSchema(V1_Query, {
|
|
56
69
|
artifactId: primitive(),
|
|
57
70
|
id: primitive(),
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
NullphobicSerializationFactory,
|
|
19
|
+
SerializationFactory,
|
|
20
|
+
usingModelSchema,
|
|
21
|
+
} from '@finos/legend-shared';
|
|
22
|
+
import { createModelSchema, list, optional, primitive } from 'serializr';
|
|
23
|
+
import type { V1_StereotypePtr } from '../../model/packageableElements/domain/V1_StereotypePtr';
|
|
24
|
+
import type { V1_TaggedValue } from '../../model/packageableElements/domain/V1_TaggedValue';
|
|
25
|
+
import {
|
|
26
|
+
V1_stereotypePtrSchema,
|
|
27
|
+
V1_taggedValueSchema,
|
|
28
|
+
} from '../../transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper';
|
|
29
|
+
|
|
30
|
+
export class V1_QueryProjectCoordinates {
|
|
31
|
+
groupId!: string;
|
|
32
|
+
artifactId!: string;
|
|
33
|
+
|
|
34
|
+
static readonly serialization = new SerializationFactory(
|
|
35
|
+
createModelSchema(V1_QueryProjectCoordinates, {
|
|
36
|
+
artifactId: primitive(),
|
|
37
|
+
groupId: primitive(),
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export class V1_QuerySearchSpecification {
|
|
43
|
+
searchTerm?: string | undefined;
|
|
44
|
+
projectCoordinates?: V1_QueryProjectCoordinates[] | undefined;
|
|
45
|
+
taggedValues?: V1_TaggedValue[] | undefined;
|
|
46
|
+
stereotypes?: V1_StereotypePtr[] | undefined;
|
|
47
|
+
limit?: number | undefined;
|
|
48
|
+
showCurrentUserQueriesOnly?: boolean | undefined;
|
|
49
|
+
|
|
50
|
+
static readonly serialization = new NullphobicSerializationFactory(
|
|
51
|
+
createModelSchema(V1_QuerySearchSpecification, {
|
|
52
|
+
limit: optional(primitive()),
|
|
53
|
+
projectCoordinates: optional(
|
|
54
|
+
list(usingModelSchema(V1_QueryProjectCoordinates.serialization.schema)),
|
|
55
|
+
),
|
|
56
|
+
searchTerm: optional(primitive()),
|
|
57
|
+
showCurrentUserQueriesOnly: optional(primitive()),
|
|
58
|
+
stereotypes: optional(list(usingModelSchema(V1_stereotypePtrSchema))),
|
|
59
|
+
taggedValues: optional(list(usingModelSchema(V1_taggedValueSchema))),
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { V1_PureModelContext } from '../../model/context/V1_PureModelContext';
|
|
18
|
+
import type { V1_Protocol } from '../../model/V1_Protocol';
|
|
19
|
+
|
|
20
|
+
export class V1_PureModelContextText extends V1_PureModelContext {
|
|
21
|
+
serializer?: V1_Protocol | undefined;
|
|
22
|
+
code?: string | undefined;
|
|
23
|
+
}
|
|
@@ -84,6 +84,7 @@ export class V1_SnowflakeDatasourceSpecification
|
|
|
84
84
|
nonProxyHosts?: string | undefined;
|
|
85
85
|
organization?: string | undefined;
|
|
86
86
|
accountType?: string | undefined;
|
|
87
|
+
role?: string | undefined;
|
|
87
88
|
|
|
88
89
|
get hashCode(): string {
|
|
89
90
|
return hashArray([
|
|
@@ -98,6 +99,7 @@ export class V1_SnowflakeDatasourceSpecification
|
|
|
98
99
|
this.nonProxyHosts ?? '',
|
|
99
100
|
this.organization ?? '',
|
|
100
101
|
this.accountType ?? '',
|
|
102
|
+
this.role ?? '',
|
|
101
103
|
this.quotedIdentifiersIgnoreCase?.toString() ?? '',
|
|
102
104
|
]);
|
|
103
105
|
}
|
package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.ts
CHANGED
|
@@ -120,6 +120,7 @@ const transformSnowflakeDatasourceSpecification = (
|
|
|
120
120
|
source.nonProxyHosts = metamodel.nonProxyHosts;
|
|
121
121
|
source.organization = metamodel.organization;
|
|
122
122
|
source.accountType = metamodel.accountType;
|
|
123
|
+
source.role = metamodel.role;
|
|
123
124
|
return source;
|
|
124
125
|
};
|
|
125
126
|
|
package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.ts
CHANGED
|
@@ -248,7 +248,8 @@ const isCompatibleDerivedProperty = (
|
|
|
248
248
|
): boolean =>
|
|
249
249
|
o.name === name &&
|
|
250
250
|
Array.isArray(o.parameters) &&
|
|
251
|
-
|
|
251
|
+
// We add 1 to account for the `this` parameter in the derived property
|
|
252
|
+
o.parameters.length + 1 === params.length;
|
|
252
253
|
|
|
253
254
|
export const V1_getAppliedProperty = (
|
|
254
255
|
parentClass: Class,
|
|
@@ -134,6 +134,7 @@ export const V1_buildDatasourceSpecification = (
|
|
|
134
134
|
snowflakeSpec.nonProxyHosts = protocol.nonProxyHosts;
|
|
135
135
|
snowflakeSpec.organization = protocol.organization;
|
|
136
136
|
snowflakeSpec.accountType = protocol.accountType;
|
|
137
|
+
snowflakeSpec.role = protocol.role;
|
|
137
138
|
return snowflakeSpec;
|
|
138
139
|
} else if (protocol instanceof V1_BigQueryDatasourceSpecification) {
|
|
139
140
|
assertNonEmptyString(
|
|
@@ -19,6 +19,8 @@ import {
|
|
|
19
19
|
guaranteeNonNullable,
|
|
20
20
|
guaranteeType,
|
|
21
21
|
UnsupportedOperationError,
|
|
22
|
+
isNonNullable,
|
|
23
|
+
uniq,
|
|
22
24
|
} from '@finos/legend-shared';
|
|
23
25
|
import {
|
|
24
26
|
TYPICAL_MULTIPLICITY_TYPE,
|
|
@@ -265,6 +267,17 @@ export class V1_ValueSpecificationBuilder
|
|
|
265
267
|
),
|
|
266
268
|
);
|
|
267
269
|
instance.values = transformed;
|
|
270
|
+
// NOTE: Engine applies a more sophisticated `findMostCommon()` algorithm to find the collection's generic type. Here we only handle the case where the collection has one type.
|
|
271
|
+
const typeValues = uniq(
|
|
272
|
+
instance.values
|
|
273
|
+
.map((v) => v.genericType?.value.rawType)
|
|
274
|
+
.filter(isNonNullable),
|
|
275
|
+
);
|
|
276
|
+
if (typeValues.length === 1) {
|
|
277
|
+
instance.genericType = GenericTypeExplicitReference.create(
|
|
278
|
+
new GenericType(guaranteeNonNullable(typeValues[0])),
|
|
279
|
+
);
|
|
280
|
+
}
|
|
268
281
|
return instance;
|
|
269
282
|
}
|
|
270
283
|
|
|
@@ -690,7 +703,7 @@ function buildPropertyGraphFetchTree(
|
|
|
690
703
|
): PropertyGraphFetchTree {
|
|
691
704
|
let property: AbstractProperty;
|
|
692
705
|
let pureParameters: ValueSpecification[] = [];
|
|
693
|
-
if (
|
|
706
|
+
if (propertyGraphFetchTree.parameters.length) {
|
|
694
707
|
const thisVariable = new V1_Variable();
|
|
695
708
|
thisVariable.name = 'this';
|
|
696
709
|
thisVariable.class = parentClass.path;
|
package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.ts
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
SKIP,
|
|
24
24
|
serialize,
|
|
25
25
|
deserialize,
|
|
26
|
+
object,
|
|
26
27
|
} from 'serializr';
|
|
27
28
|
import type { PlainObject } from '@finos/legend-shared';
|
|
28
29
|
import {
|
|
@@ -46,6 +47,7 @@ import { V1_packageableElementPointerDeserializerSchema } from '../../transforma
|
|
|
46
47
|
import type { PureProtocolProcessorPlugin } from '../../../PureProtocolProcessorPlugin';
|
|
47
48
|
import type { Entity } from '@finos/legend-model-storage';
|
|
48
49
|
import { GraphDataDeserializationError } from '../../../../../../graphManager/GraphManagerUtils';
|
|
50
|
+
import { V1_PureModelContextText } from '../../model/context/V1_PureModelContextText';
|
|
49
51
|
|
|
50
52
|
enum V1_SDLCType {
|
|
51
53
|
ALLOY = 'alloy',
|
|
@@ -55,6 +57,7 @@ export enum V1_PureModelContextType {
|
|
|
55
57
|
DATA = 'data',
|
|
56
58
|
POINTER = 'pointer',
|
|
57
59
|
COMPOSITE = 'composite',
|
|
60
|
+
TEXT = 'text',
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
export const V1_entitiesToPureModelContextData = async (
|
|
@@ -109,10 +112,13 @@ const alloySDLCSerializationModelSchema = createModelSchema(V1_AlloySDLC, {
|
|
|
109
112
|
),
|
|
110
113
|
});
|
|
111
114
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
const V1_pureModelContextTextSchema = createModelSchema(
|
|
116
|
+
V1_PureModelContextText,
|
|
117
|
+
{
|
|
118
|
+
_type: usingConstantValueSchema(V1_PureModelContextType.TEXT),
|
|
119
|
+
serializer: usingModelSchema(V1_Protocol.serialization.schema),
|
|
120
|
+
code: optional(primitive()),
|
|
121
|
+
},
|
|
116
122
|
);
|
|
117
123
|
|
|
118
124
|
const V1_pureModelContextPointerModelSchema = createModelSchema(
|
|
@@ -129,7 +135,7 @@ const V1_pureModelContextCompositeModelSchema = createModelSchema(
|
|
|
129
135
|
{
|
|
130
136
|
_type: usingConstantValueSchema(V1_PureModelContextType.COMPOSITE),
|
|
131
137
|
serializer: usingModelSchema(V1_Protocol.serialization.schema),
|
|
132
|
-
data:
|
|
138
|
+
data: object(V1_PureModelContextData),
|
|
133
139
|
pointer: usingModelSchema(V1_pureModelContextPointerModelSchema),
|
|
134
140
|
},
|
|
135
141
|
);
|
|
@@ -172,9 +178,17 @@ export const V1_serializePureModelContext = (
|
|
|
172
178
|
return V1_serializePureModelContextData(pureModelContext);
|
|
173
179
|
} else if (pureModelContext instanceof V1_PureModelContextComposite) {
|
|
174
180
|
return serialize(V1_pureModelContextCompositeModelSchema, pureModelContext);
|
|
181
|
+
} else if (pureModelContext instanceof V1_PureModelContextText) {
|
|
182
|
+
return serialize(V1_pureModelContextTextSchema, pureModelContext);
|
|
175
183
|
}
|
|
176
184
|
throw new UnsupportedOperationError(
|
|
177
185
|
`Can't serialize Pure model context`,
|
|
178
186
|
pureModelContext,
|
|
179
187
|
);
|
|
180
188
|
};
|
|
189
|
+
|
|
190
|
+
export const V1_pureModelContextPropSchema = custom(
|
|
191
|
+
(val: V1_PureModelContext) => V1_serializePureModelContext(val),
|
|
192
|
+
// TODO: we will populate this when we need to `deserialize`
|
|
193
|
+
(val) => SKIP,
|
|
194
|
+
);
|
|
@@ -175,6 +175,7 @@ const snowflakeDatasourceSpecificationModelSchema = createModelSchema(
|
|
|
175
175
|
proxyPort: optional(primitive()),
|
|
176
176
|
quotedIdentifiersIgnoreCase: optional(primitive()),
|
|
177
177
|
region: primitive(),
|
|
178
|
+
role: optional(primitive()),
|
|
178
179
|
warehouseName: primitive(),
|
|
179
180
|
},
|
|
180
181
|
);
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
list,
|
|
22
22
|
deserialize,
|
|
23
23
|
serialize,
|
|
24
|
-
SKIP,
|
|
25
24
|
object,
|
|
26
25
|
alias,
|
|
27
26
|
optional,
|
|
28
27
|
} from 'serializr';
|
|
29
28
|
import type { PlainObject } from '@finos/legend-shared';
|
|
30
29
|
import {
|
|
30
|
+
optionalCustom,
|
|
31
31
|
usingConstantValueSchema,
|
|
32
32
|
deserializeArray,
|
|
33
33
|
UnsupportedOperationError,
|
|
@@ -343,11 +343,9 @@ const V1_elementWithJoinsModelSchema = createModelSchema(V1_ElementWithJoins, {
|
|
|
343
343
|
V1_RelationalOperationElementType.ELEMENT_WITH_JOINS,
|
|
344
344
|
),
|
|
345
345
|
joins: list(usingModelSchema(V1_joinPointerModelSchema)),
|
|
346
|
-
relationalElement:
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
(val) =>
|
|
350
|
-
val === undefined ? SKIP : V1_deserializeRelationalOperationElement(val),
|
|
346
|
+
relationalElement: optionalCustom(
|
|
347
|
+
V1_serializeRelationalOperationElement,
|
|
348
|
+
V1_deserializeRelationalOperationElement,
|
|
351
349
|
),
|
|
352
350
|
});
|
|
353
351
|
|
|
@@ -251,10 +251,7 @@ export const V1_constraintSchema = createModelSchema(V1_Constraint, {
|
|
|
251
251
|
enforcementLevel: optional(primitive()),
|
|
252
252
|
externalId: optional(primitive()),
|
|
253
253
|
functionDefinition: usingModelSchema(V1_rawLambdaModelSchema),
|
|
254
|
-
messageFunction:
|
|
255
|
-
(value) => (value ? serialize(V1_rawLambdaModelSchema, value) : SKIP),
|
|
256
|
-
(value) => deserialize(V1_rawLambdaModelSchema, value),
|
|
257
|
-
),
|
|
254
|
+
messageFunction: optional(usingModelSchema(V1_rawLambdaModelSchema)),
|
|
258
255
|
name: primitive(),
|
|
259
256
|
});
|
|
260
257
|
|
|
@@ -577,7 +577,7 @@ function V1_serializeClassMapping(
|
|
|
577
577
|
} else if (value instanceof V1_AggregationAwareClassMapping) {
|
|
578
578
|
return serialize(aggregationAwareClassMappingModelSchema, value);
|
|
579
579
|
}
|
|
580
|
-
if (plugins
|
|
580
|
+
if (plugins) {
|
|
581
581
|
const extraClassMappingSerializers = plugins.flatMap(
|
|
582
582
|
(plugin) =>
|
|
583
583
|
(
|
|
@@ -615,7 +615,7 @@ function V1_deserializeClassMapping(
|
|
|
615
615
|
case V1_ClassMappingType.AGGREGATION_AWARE:
|
|
616
616
|
return deserialize(aggregationAwareClassMappingModelSchema, json);
|
|
617
617
|
default: {
|
|
618
|
-
if (plugins
|
|
618
|
+
if (plugins) {
|
|
619
619
|
const extraClassMappingDeserializers = plugins.flatMap(
|
|
620
620
|
(plugin) =>
|
|
621
621
|
(
|
|
@@ -1007,18 +1007,8 @@ export const V1_mappingModelSchema = (
|
|
|
1007
1007
|
),
|
|
1008
1008
|
classMappings: list(
|
|
1009
1009
|
custom(
|
|
1010
|
-
(val) =>
|
|
1011
|
-
|
|
1012
|
-
return V1_serializeClassMapping(val, plugins);
|
|
1013
|
-
}
|
|
1014
|
-
return V1_serializeClassMapping(val);
|
|
1015
|
-
},
|
|
1016
|
-
(val) => {
|
|
1017
|
-
if (plugins !== undefined) {
|
|
1018
|
-
return V1_deserializeClassMapping(val, plugins);
|
|
1019
|
-
}
|
|
1020
|
-
return V1_deserializeClassMapping(val);
|
|
1021
|
-
},
|
|
1010
|
+
(val) => V1_serializeClassMapping(val, plugins),
|
|
1011
|
+
(val) => V1_deserializeClassMapping(val, plugins),
|
|
1022
1012
|
),
|
|
1023
1013
|
),
|
|
1024
1014
|
enumerationMappings: list(
|
|
@@ -16,16 +16,15 @@
|
|
|
16
16
|
|
|
17
17
|
import type { PlainObject } from '@finos/legend-shared';
|
|
18
18
|
import {
|
|
19
|
+
optionalCustom,
|
|
19
20
|
usingConstantValueSchema,
|
|
20
21
|
UnsupportedOperationError,
|
|
21
22
|
} from '@finos/legend-shared';
|
|
22
23
|
import {
|
|
23
24
|
createModelSchema,
|
|
24
|
-
custom,
|
|
25
25
|
deserialize,
|
|
26
26
|
primitive,
|
|
27
27
|
serialize,
|
|
28
|
-
SKIP,
|
|
29
28
|
} from 'serializr';
|
|
30
29
|
import { V1_BusinessMilestoning } from '../../../model/packageableElements/store/relational/model/milestoning/V1_BusinessMilestoning';
|
|
31
30
|
import { V1_BusinessSnapshotMilestoning } from '../../../model/packageableElements/store/relational/model/milestoning/V1_BusinessSnapshotMilestoning';
|
|
@@ -49,9 +48,9 @@ const businessMilestoningModelSchema = createModelSchema(
|
|
|
49
48
|
{
|
|
50
49
|
_type: usingConstantValueSchema(V1_MilestoningType.BUSINESS_MILESTONING),
|
|
51
50
|
from: primitive(),
|
|
52
|
-
infinityDate:
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
infinityDate: optionalCustom(
|
|
52
|
+
V1_serializeRawValueSpecification,
|
|
53
|
+
V1_deserializeRawValueSpecification,
|
|
55
54
|
),
|
|
56
55
|
thru: primitive(),
|
|
57
56
|
thruIsInclusive: primitive(),
|
|
@@ -64,9 +63,9 @@ const businessSnapshotMilestoningModelSchema = createModelSchema(
|
|
|
64
63
|
_type: usingConstantValueSchema(
|
|
65
64
|
V1_MilestoningType.BUSINESS_SNAPSHOT_MILESTONING,
|
|
66
65
|
),
|
|
67
|
-
infinityDate:
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
infinityDate: optionalCustom(
|
|
67
|
+
V1_serializeRawValueSpecification,
|
|
68
|
+
V1_deserializeRawValueSpecification,
|
|
70
69
|
),
|
|
71
70
|
snapshotDate: primitive(),
|
|
72
71
|
},
|
|
@@ -77,9 +76,9 @@ const processingMilestoningModelSchema = createModelSchema(
|
|
|
77
76
|
{
|
|
78
77
|
_type: usingConstantValueSchema(V1_MilestoningType.PROCESSING_MILESTONING),
|
|
79
78
|
in: primitive(),
|
|
80
|
-
infinityDate:
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
infinityDate: optionalCustom(
|
|
80
|
+
V1_serializeRawValueSpecification,
|
|
81
|
+
V1_deserializeRawValueSpecification,
|
|
83
82
|
),
|
|
84
83
|
out: primitive(),
|
|
85
84
|
outIsInclusive: primitive(),
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
primitive,
|
|
23
23
|
list,
|
|
24
24
|
optional,
|
|
25
|
-
SKIP,
|
|
26
25
|
} from 'serializr';
|
|
27
26
|
import type { PlainObject } from '@finos/legend-shared';
|
|
28
27
|
import {
|
|
28
|
+
optionalCustom,
|
|
29
29
|
deserializeArray,
|
|
30
30
|
serializeArray,
|
|
31
31
|
deseralizeMap,
|
|
@@ -64,9 +64,9 @@ const dataTypeResultTypeModelSchema = createModelSchema(V1_DataTypeResultType, {
|
|
|
64
64
|
|
|
65
65
|
const TDSColumnModelSchema = createModelSchema(V1_TDSColumn, {
|
|
66
66
|
doc: optional(primitive()),
|
|
67
|
-
enumMapping:
|
|
68
|
-
(val) =>
|
|
69
|
-
|
|
67
|
+
enumMapping: optionalCustom(
|
|
68
|
+
(val: Map<string, unknown>) => serializeMap(val),
|
|
69
|
+
deseralizeMap,
|
|
70
70
|
),
|
|
71
71
|
name: primitive(),
|
|
72
72
|
relationalType: optional(primitive()),
|
package/tsconfig.json
CHANGED
|
@@ -70,10 +70,12 @@
|
|
|
70
70
|
"./src/graphManager/action/generation/GenerationOutput.ts",
|
|
71
71
|
"./src/graphManager/action/generation/ImportConfigurationDescription.ts",
|
|
72
72
|
"./src/graphManager/action/query/Query.ts",
|
|
73
|
+
"./src/graphManager/action/query/QuerySearchSpecification.ts",
|
|
73
74
|
"./src/graphManager/action/service/ServiceExecutionMode.ts",
|
|
74
75
|
"./src/graphManager/action/service/ServiceRegistrationResult.ts",
|
|
75
76
|
"./src/graphManager/action/service/ServiceTestResult.ts",
|
|
76
77
|
"./src/helpers/DatabaseHelper.ts",
|
|
78
|
+
"./src/helpers/DomainHelper.ts",
|
|
77
79
|
"./src/helpers/MappingHelper.ts",
|
|
78
80
|
"./src/helpers/MappingResolutionHelper.ts",
|
|
79
81
|
"./src/helpers/ServiceHelper.ts",
|
|
@@ -265,6 +267,7 @@
|
|
|
265
267
|
"./src/models/protocols/pure/v1/engine/import/V1_ImportConfigurationDescription.ts",
|
|
266
268
|
"./src/models/protocols/pure/v1/engine/import/V1_PureModelContextGenerationInput.ts",
|
|
267
269
|
"./src/models/protocols/pure/v1/engine/query/V1_Query.ts",
|
|
270
|
+
"./src/models/protocols/pure/v1/engine/query/V1_QuerySearchSpecification.ts",
|
|
268
271
|
"./src/models/protocols/pure/v1/engine/service/V1_ServiceConfiguration.ts",
|
|
269
272
|
"./src/models/protocols/pure/v1/engine/service/V1_ServiceRegistrationResult.ts",
|
|
270
273
|
"./src/models/protocols/pure/v1/engine/service/V1_ServiceStorage.ts",
|
|
@@ -275,6 +278,7 @@
|
|
|
275
278
|
"./src/models/protocols/pure/v1/model/context/V1_PureModelContextComposite.ts",
|
|
276
279
|
"./src/models/protocols/pure/v1/model/context/V1_PureModelContextData.ts",
|
|
277
280
|
"./src/models/protocols/pure/v1/model/context/V1_PureModelContextPointer.ts",
|
|
281
|
+
"./src/models/protocols/pure/v1/model/context/V1_PureModelContextText.ts",
|
|
278
282
|
"./src/models/protocols/pure/v1/model/context/V1_SDLC.ts",
|
|
279
283
|
"./src/models/protocols/pure/v1/model/executionPlan/V1_ExecutionPlan.ts",
|
|
280
284
|
"./src/models/protocols/pure/v1/model/executionPlan/V1_SimpleExecutionPlan.ts",
|