@finos/legend-graph 0.1.3 → 0.2.2
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/DSLMapping_Exports.d.ts +2 -0
- package/lib/DSLMapping_Exports.d.ts.map +1 -1
- package/lib/DSLMapping_Exports.js +1 -0
- package/lib/DSLMapping_Exports.js.map +1 -1
- package/lib/DSLService_Exports.d.ts +0 -1
- package/lib/DSLService_Exports.d.ts.map +1 -1
- package/lib/DSLService_Exports.js +0 -1
- package/lib/DSLService_Exports.js.map +1 -1
- package/lib/GraphManagerState.d.ts +1 -0
- package/lib/GraphManagerState.d.ts.map +1 -1
- package/lib/GraphManagerState.js +27 -2
- package/lib/GraphManagerState.js.map +1 -1
- package/lib/GraphManagerTestUtils.d.ts +1 -1
- package/lib/GraphManagerTestUtils.d.ts.map +1 -1
- package/lib/GraphManagerTestUtils.js +1 -1
- package/lib/GraphManagerTestUtils.js.map +1 -1
- package/lib/GraphPluginManager.d.ts +1 -1
- package/lib/GraphPluginManager.d.ts.map +1 -1
- package/lib/MetaModelConst.d.ts +0 -2
- package/lib/MetaModelConst.d.ts.map +1 -1
- package/lib/MetaModelConst.js +0 -3
- package/lib/MetaModelConst.js.map +1 -1
- package/lib/graph/BasicModel.d.ts +1 -2
- package/lib/graph/BasicModel.d.ts.map +1 -1
- package/lib/graph/BasicModel.js +3 -13
- package/lib/graph/BasicModel.js.map +1 -1
- package/lib/graph/DependencyManager.d.ts +1 -0
- package/lib/graph/DependencyManager.d.ts.map +1 -1
- package/lib/graph/DependencyManager.js +5 -2
- package/lib/graph/DependencyManager.js.map +1 -1
- package/lib/graph/PureModel.d.ts +0 -2
- package/lib/graph/PureModel.d.ts.map +1 -1
- package/lib/graph/PureModel.js +0 -4
- package/lib/graph/PureModel.js.map +1 -1
- package/lib/graphManager/DSLMapping_PureGraphManagerPlugin_Extension.d.ts +25 -0
- package/lib/graphManager/DSLMapping_PureGraphManagerPlugin_Extension.d.ts.map +1 -0
- package/lib/{models/protocols/pure/v1/transformation/pureGraph/from/V1_ServiceStoreTransformer.d.ts → graphManager/DSLMapping_PureGraphManagerPlugin_Extension.js} +2 -4
- package/lib/graphManager/DSLMapping_PureGraphManagerPlugin_Extension.js.map +1 -0
- package/lib/{models/protocols/pure/v1/transformation/pureGraph/from/V1_ServiceStoreTransformer.js → graphManager/action/ExecutionError.d.ts} +6 -9
- package/lib/graphManager/action/ExecutionError.d.ts.map +1 -0
- package/lib/{models/metamodels/pure/packageableElements/store/relational/model/ServiceStore.d.ts → graphManager/action/ExecutionError.js} +4 -9
- package/lib/graphManager/action/ExecutionError.js.map +1 -0
- package/lib/helpers/MappingResolutionHelper.js +1 -1
- package/lib/helpers/MappingResolutionHelper.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/PackageableElement.d.ts +0 -2
- package/lib/models/metamodels/pure/packageableElements/PackageableElement.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/PackageableElement.js +0 -1
- package/lib/models/metamodels/pure/packageableElements/PackageableElement.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/domain/Association.js +1 -1
- package/lib/models/metamodels/pure/packageableElements/domain/Association.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/EnumValueMapping.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/EnumValueMapping.js +2 -2
- package/lib/models/metamodels/pure/packageableElements/mapping/EnumValueMapping.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.d.ts +2 -0
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.js +0 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RelationalInputData.d.ts +1 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RelationalInputData.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RelationalInputData.js +4 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RelationalInputData.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/model/RelationalOperationElement.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/model/RelationalOperationElement.js +3 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/model/RelationalOperationElement.js.map +1 -1
- package/lib/models/metamodels/pure/valueSpecification/SimpleFunctionExpression.d.ts.map +1 -1
- package/lib/models/metamodels/pure/valueSpecification/SimpleFunctionExpression.js +1 -0
- package/lib/models/metamodels/pure/valueSpecification/SimpleFunctionExpression.js.map +1 -1
- package/lib/models/protocols/pure/DSLMapping_PureProtocolProcessorPlugin_Extension.d.ts +15 -2
- package/lib/models/protocols/pure/DSLMapping_PureProtocolProcessorPlugin_Extension.d.ts.map +1 -1
- package/lib/models/protocols/pure/DSLMapping_PureProtocolProcessorPlugin_Extension.js +1 -3
- package/lib/models/protocols/pure/DSLMapping_PureProtocolProcessorPlugin_Extension.js.map +1 -1
- package/lib/models/protocols/pure/PureProtocolProcessorPlugin.d.ts +2 -2
- package/lib/models/protocols/pure/PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/models/protocols/pure/PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.js +3 -15
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.js +15 -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 +7 -0
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecutionError.d.ts +22 -0
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecutionError.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecutionError.js +26 -0
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecutionError.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/context/V1_PureModelContextPointer.d.ts +3 -3
- package/lib/models/protocols/pure/v1/model/context/V1_PureModelContextPointer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/context/{V1_AlloySdlc.d.ts → V1_SDLC.d.ts} +4 -4
- package/lib/models/protocols/pure/v1/model/context/V1_SDLC.d.ts.map +1 -0
- package/lib/models/protocols/pure/v1/model/context/{V1_AlloySdlc.js → V1_SDLC.js} +3 -3
- package/lib/models/protocols/pure/v1/model/context/V1_SDLC.js.map +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/V1_PackageableElement.d.ts +0 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/V1_PackageableElement.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/V1_PackageableElement.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/connection/V1_Connection.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/connection/V1_Connection.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.d.ts +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.js +4 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.d.ts +2 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.js +16 -4
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_PackageableElementTransformer.d.ts +0 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_PackageableElementTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_PackageableElementTransformer.js +0 -4
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_PackageableElementTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.js +3 -3
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ExecutionPlanBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ExecutionPlanBuilder.js +6 -6
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ExecutionPlanBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.js +2 -3
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.d.ts +2 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.js +10 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.d.ts +2 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.js +10 -4
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelConnectionBuilder.js +2 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelConnectionBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFifthPassBuilder.d.ts +0 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFifthPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFifthPassBuilder.js +0 -3
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFifthPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFirstPassBuilder.d.ts +0 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFirstPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFirstPassBuilder.js +0 -13
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFirstPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFourthPassBuilder.d.ts +0 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFourthPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFourthPassBuilder.js +0 -3
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFourthPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.d.ts +0 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.js +0 -6
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphThirdPassBuilder.d.ts +0 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphThirdPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphThirdPassBuilder.js +3 -6
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphThirdPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.js +12 -10
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_AssociationMappingHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_AssociationMappingHelper.js +3 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_AssociationMappingHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.js +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ProcessingContext.d.ts +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ProcessingContext.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ProcessingContext.js +6 -4
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ProcessingContext.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 +11 -10
- 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_PackageableElementSerialization.d.ts +0 -2
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.js +5 -11
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.js +8 -8
- 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 +2 -4
- 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_MappingSerializationHelper.d.ts +3 -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 +36 -7
- 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_StoreSerializationHelper.d.ts +0 -3
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_StoreSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_StoreSerializationHelper.js +0 -10
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_StoreSerializationHelper.js.map +1 -1
- package/package.json +10 -9
- package/src/DSLMapping_Exports.ts +2 -0
- package/src/DSLService_Exports.ts +0 -1
- package/src/GraphManagerState.ts +35 -4
- package/src/GraphManagerTestUtils.tsx +1 -1
- package/src/GraphPluginManager.ts +1 -1
- package/src/MetaModelConst.ts +0 -3
- package/src/graph/BasicModel.ts +6 -15
- package/src/graph/DependencyManager.ts +7 -2
- package/src/graph/PureModel.ts +0 -9
- package/{lib/models/protocols/pure/v1/model/packageableElements/store/relational/V1_ServiceStore.d.ts → src/graphManager/DSLMapping_PureGraphManagerPlugin_Extension.ts} +14 -8
- package/src/graphManager/action/ExecutionError.ts +24 -0
- package/src/helpers/MappingResolutionHelper.ts +3 -3
- package/src/index.ts +2 -0
- package/src/models/metamodels/pure/packageableElements/PackageableElement.ts +0 -3
- package/src/models/metamodels/pure/packageableElements/domain/Association.ts +1 -1
- package/src/models/metamodels/pure/packageableElements/mapping/EnumValueMapping.ts +7 -2
- package/src/models/metamodels/pure/packageableElements/mapping/SetImplementation.ts +2 -1
- package/src/models/metamodels/pure/packageableElements/store/relational/mapping/RelationalInputData.ts +5 -0
- package/src/models/metamodels/pure/packageableElements/store/relational/model/RelationalOperationElement.ts +3 -1
- package/src/models/metamodels/pure/valueSpecification/SimpleFunctionExpression.ts +1 -0
- package/src/models/protocols/pure/DSLMapping_PureProtocolProcessorPlugin_Extension.ts +41 -2
- package/src/models/protocols/pure/PureProtocolProcessorPlugin.ts +2 -0
- package/src/models/protocols/pure/v1/V1_PureGraphManager.ts +3 -14
- package/src/models/protocols/pure/v1/engine/V1_Engine.ts +25 -11
- package/src/models/protocols/pure/v1/engine/V1_EngineHelper.ts +11 -0
- package/src/models/protocols/pure/v1/engine/execution/V1_ExecutionError.ts +30 -0
- package/src/models/protocols/pure/v1/model/context/V1_PureModelContextPointer.ts +3 -3
- package/src/models/protocols/pure/v1/model/context/{V1_AlloySdlc.ts → V1_SDLC.ts} +3 -3
- package/src/models/protocols/pure/v1/model/packageableElements/V1_PackageableElement.ts +0 -3
- package/src/models/protocols/pure/v1/model/packageableElements/connection/V1_Connection.ts +0 -1
- package/src/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.ts +1 -1
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.ts +4 -2
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.ts +30 -4
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_PackageableElementTransformer.ts +0 -6
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.ts +3 -3
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ExecutionPlanBuilder.ts +32 -6
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.ts +2 -2
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.ts +28 -1
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.ts +23 -4
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelConnectionBuilder.ts +2 -2
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFifthPassBuilder.ts +0 -7
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFirstPassBuilder.ts +0 -27
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFourthPassBuilder.ts +0 -7
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.ts +0 -13
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphThirdPassBuilder.ts +3 -9
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.ts +18 -11
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_AssociationMappingHelper.ts +3 -2
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.ts +13 -4
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.ts +3 -1
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ProcessingContext.ts +8 -4
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.ts +18 -12
- package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.ts +4 -16
- package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.ts +5 -5
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.ts +5 -4
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.ts +86 -32
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_StoreSerializationHelper.ts +0 -13
- package/tsconfig.json +5 -4
- package/tsconfig.package.json +1 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/model/ServiceStore.d.ts.map +0 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/model/ServiceStore.js +0 -41
- package/lib/models/metamodels/pure/packageableElements/store/relational/model/ServiceStore.js.map +0 -1
- package/lib/models/protocols/pure/v1/model/context/V1_AlloySdlc.d.ts.map +0 -1
- package/lib/models/protocols/pure/v1/model/context/V1_AlloySdlc.js.map +0 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/V1_ServiceStore.d.ts.map +0 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/V1_ServiceStore.js +0 -33
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/V1_ServiceStore.js.map +0 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ServiceStoreTransformer.d.ts.map +0 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ServiceStoreTransformer.js.map +0 -1
- package/src/models/metamodels/pure/packageableElements/store/relational/model/ServiceStore.ts +0 -50
- package/src/models/protocols/pure/v1/model/packageableElements/store/relational/V1_ServiceStore.ts +0 -40
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_ServiceStoreTransformer.ts +0 -28
|
@@ -96,19 +96,45 @@ const parseDataType = (val: string): RelationalDataType => {
|
|
|
96
96
|
return new Other();
|
|
97
97
|
default: {
|
|
98
98
|
if (val.match(/^VARCHAR\(\d+\)$/)) {
|
|
99
|
-
return new VarChar(
|
|
99
|
+
return new VarChar(
|
|
100
|
+
guaranteeNonNullable(
|
|
101
|
+
getTypeParams(val)[0],
|
|
102
|
+
`VARCHAR type size is missing`,
|
|
103
|
+
),
|
|
104
|
+
);
|
|
100
105
|
} else if (val.match(/^CHAR\(\d+\)$/)) {
|
|
101
|
-
return new Char(
|
|
106
|
+
return new Char(
|
|
107
|
+
guaranteeNonNullable(
|
|
108
|
+
getTypeParams(val)[0],
|
|
109
|
+
`VAR type size is missing`,
|
|
110
|
+
),
|
|
111
|
+
);
|
|
102
112
|
} else if (val.match(/^VARBINARY\(\d+\)$/)) {
|
|
103
|
-
return new VarBinary(
|
|
113
|
+
return new VarBinary(
|
|
114
|
+
guaranteeNonNullable(
|
|
115
|
+
getTypeParams(val)[0],
|
|
116
|
+
`VARBINARY type size is missing`,
|
|
117
|
+
),
|
|
118
|
+
);
|
|
104
119
|
} else if (val.match(/^BINARY\(\d+\)$/)) {
|
|
105
|
-
return new Binary(
|
|
120
|
+
return new Binary(
|
|
121
|
+
guaranteeNonNullable(
|
|
122
|
+
getTypeParams(val)[0],
|
|
123
|
+
`BINARY type size is missing`,
|
|
124
|
+
),
|
|
125
|
+
);
|
|
106
126
|
} else if (val.match(/^DECIMAL\(\d+\)$/)) {
|
|
107
127
|
const params = getTypeParams(val);
|
|
108
|
-
return new Decimal(
|
|
128
|
+
return new Decimal(
|
|
129
|
+
guaranteeNonNullable(params[0], `Decimal type precision is missing`),
|
|
130
|
+
guaranteeNonNullable(params[1], `Decimal type scale is missing`),
|
|
131
|
+
);
|
|
109
132
|
} else if (val.match(/^NUMERIC\(\d+\)$/)) {
|
|
110
133
|
const params = getTypeParams(val);
|
|
111
|
-
return new Numeric(
|
|
134
|
+
return new Numeric(
|
|
135
|
+
guaranteeNonNullable(params[0], `Decimal type precision is missing`),
|
|
136
|
+
guaranteeNonNullable(params[1], `Decimal type scale is missing`),
|
|
137
|
+
);
|
|
112
138
|
}
|
|
113
139
|
throw new UnsupportedOperationError(`Can't parse data type '${val}'`);
|
|
114
140
|
}
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
import type { Log } from '@finos/legend-shared';
|
|
22
22
|
import {
|
|
23
23
|
uniq,
|
|
24
|
+
guaranteeNonNullable,
|
|
24
25
|
assertNonEmptyString,
|
|
25
26
|
guaranteeType,
|
|
26
27
|
} from '@finos/legend-shared';
|
|
@@ -161,7 +162,7 @@ export class V1_GraphBuilderContext {
|
|
|
161
162
|
isFullPath: true,
|
|
162
163
|
};
|
|
163
164
|
case 1:
|
|
164
|
-
return Array.from(results.values())[0];
|
|
165
|
+
return guaranteeNonNullable(Array.from(results.values())[0]);
|
|
165
166
|
default:
|
|
166
167
|
throw new GraphBuilderError(
|
|
167
168
|
undefined,
|
|
@@ -350,7 +351,6 @@ export class V1_GraphBuilderContext {
|
|
|
350
351
|
return EnumValueImplicitReference.create(ownerReference, value);
|
|
351
352
|
};
|
|
352
353
|
|
|
353
|
-
/* @MARKER: NEW ELEMENT TYPE SUPPORT --- consider adding new element type handler here whenever support for a new element type is added to the app */
|
|
354
354
|
resolveElement = (
|
|
355
355
|
path: string,
|
|
356
356
|
includePackage: boolean,
|
|
@@ -30,7 +30,10 @@ import { FlatDataInstanceSetImplementation } from '../../../../../../metamodels/
|
|
|
30
30
|
import { RootRelationalInstanceSetImplementation } from '../../../../../../metamodels/pure/packageableElements/store/relational/mapping/RootRelationalInstanceSetImplementation';
|
|
31
31
|
import { InferableMappingElementRootExplicitValue } from '../../../../../../metamodels/pure/packageableElements/mapping/InferableMappingElementRoot';
|
|
32
32
|
import type { V1_GraphBuilderContext } from '../../../transformation/pureGraph/to/V1_GraphBuilderContext';
|
|
33
|
-
import type {
|
|
33
|
+
import type {
|
|
34
|
+
V1_ClassMappingVisitor,
|
|
35
|
+
V1_ClassMapping,
|
|
36
|
+
} from '../../../model/packageableElements/mapping/V1_ClassMapping';
|
|
34
37
|
import type { V1_OperationClassMapping } from '../../../model/packageableElements/mapping/V1_OperationClassMapping';
|
|
35
38
|
import type { V1_PureInstanceClassMapping } from '../../../model/packageableElements/store/modelToModel/mapping/V1_PureInstanceClassMapping';
|
|
36
39
|
import type { V1_RelationalClassMapping } from '../../../model/packageableElements/store/relational/mapping/V1_RelationalClassMapping';
|
|
@@ -44,6 +47,7 @@ import { V1_buildAggregateContainer } from './helpers/V1_AggregationAwareClassMa
|
|
|
44
47
|
import { V1_resolvePathsInRawLambda } from './helpers/V1_ValueSpecificationPathResolver';
|
|
45
48
|
import { V1_buildRelationalMappingFilter } from './helpers/V1_RelationalClassMappingBuilderHelper';
|
|
46
49
|
import { toOptionalPackageableElementReference } from '../../../../../../metamodels/pure/packageableElements/PackageableElementReference';
|
|
50
|
+
import type { DSLMapping_PureProtocolProcessorPlugin_Extension } from '../../../../DSLMapping_PureProtocolProcessorPlugin_Extension';
|
|
47
51
|
|
|
48
52
|
export class V1_ProtocolToMetaModelClassMappingFirstPassBuilder
|
|
49
53
|
implements V1_ClassMappingVisitor<SetImplementation>
|
|
@@ -56,6 +60,29 @@ export class V1_ProtocolToMetaModelClassMappingFirstPassBuilder
|
|
|
56
60
|
this.parent = parent;
|
|
57
61
|
}
|
|
58
62
|
|
|
63
|
+
visit_ClassMapping(classMapping: V1_ClassMapping): SetImplementation {
|
|
64
|
+
const extraClassMappingBuilders = this.context.extensions.plugins.flatMap(
|
|
65
|
+
(plugin) =>
|
|
66
|
+
(
|
|
67
|
+
plugin as DSLMapping_PureProtocolProcessorPlugin_Extension
|
|
68
|
+
).V1_getExtraClassMappingFirstPassBuilders?.() ?? [],
|
|
69
|
+
);
|
|
70
|
+
for (const builder of extraClassMappingBuilders) {
|
|
71
|
+
const extraClassMapping = builder(
|
|
72
|
+
classMapping,
|
|
73
|
+
this.context,
|
|
74
|
+
this.parent,
|
|
75
|
+
);
|
|
76
|
+
if (extraClassMapping) {
|
|
77
|
+
return extraClassMapping;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
throw new UnsupportedOperationError(
|
|
81
|
+
`Can't build new class mapping: no compatible builder available from plugins`,
|
|
82
|
+
classMapping,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
59
86
|
visit_OperationClassMapping(
|
|
60
87
|
classMapping: V1_OperationClassMapping,
|
|
61
88
|
): SetImplementation {
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
guaranteeType,
|
|
23
23
|
assertNonEmptyString,
|
|
24
24
|
assertTrue,
|
|
25
|
+
guaranteeNonNullable,
|
|
25
26
|
} from '@finos/legend-shared';
|
|
26
27
|
import { GRAPH_MANAGER_LOG_EVENT } from '../../../../../../../graphManager/GraphManagerLogEvent';
|
|
27
28
|
import type { Mapping } from '../../../../../../metamodels/pure/packageableElements/mapping/Mapping';
|
|
@@ -43,7 +44,10 @@ import {
|
|
|
43
44
|
V1_buildRelationalClassMapping,
|
|
44
45
|
V1_buildRelationalPrimaryKey,
|
|
45
46
|
} from './helpers/V1_RelationalClassMappingBuilderHelper';
|
|
46
|
-
import type {
|
|
47
|
+
import type {
|
|
48
|
+
V1_ClassMappingVisitor,
|
|
49
|
+
V1_ClassMapping,
|
|
50
|
+
} from '../../../model/packageableElements/mapping/V1_ClassMapping';
|
|
47
51
|
import type { V1_OperationClassMapping } from '../../../model/packageableElements/mapping/V1_OperationClassMapping';
|
|
48
52
|
import type { V1_PureInstanceClassMapping } from '../../../model/packageableElements/store/modelToModel/mapping/V1_PureInstanceClassMapping';
|
|
49
53
|
import type { V1_RelationalClassMapping } from '../../../model/packageableElements/store/relational/mapping/V1_RelationalClassMapping';
|
|
@@ -61,6 +65,7 @@ import {
|
|
|
61
65
|
getAllEnumerationMappings,
|
|
62
66
|
getOwnClassMappingById,
|
|
63
67
|
} from '../../../../../../../helpers/MappingHelper';
|
|
68
|
+
import type { DSLMapping_PureProtocolProcessorPlugin_Extension } from '../../../../DSLMapping_PureProtocolProcessorPlugin_Extension';
|
|
64
69
|
|
|
65
70
|
export class V1_ProtocolToMetaModelClassMappingSecondPassBuilder
|
|
66
71
|
implements V1_ClassMappingVisitor<void>
|
|
@@ -73,6 +78,18 @@ export class V1_ProtocolToMetaModelClassMappingSecondPassBuilder
|
|
|
73
78
|
this.parent = parent;
|
|
74
79
|
}
|
|
75
80
|
|
|
81
|
+
visit_ClassMapping(classMapping: V1_ClassMapping): void {
|
|
82
|
+
const extraClassMappingBuilders = this.context.extensions.plugins.flatMap(
|
|
83
|
+
(plugin) =>
|
|
84
|
+
(
|
|
85
|
+
plugin as DSLMapping_PureProtocolProcessorPlugin_Extension
|
|
86
|
+
).V1_getExtraClassMappingSecondPassBuilders?.() ?? [],
|
|
87
|
+
);
|
|
88
|
+
for (const builder of extraClassMappingBuilders) {
|
|
89
|
+
builder(classMapping, this.context, this.parent);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
76
93
|
visit_OperationClassMapping(classMapping: V1_OperationClassMapping): void {
|
|
77
94
|
assertNonEmptyString(
|
|
78
95
|
classMapping.class,
|
|
@@ -138,7 +155,7 @@ export class V1_ProtocolToMetaModelClassMappingSecondPassBuilder
|
|
|
138
155
|
this.context,
|
|
139
156
|
pureInstanceSetImplementation,
|
|
140
157
|
pureInstanceSetImplementation,
|
|
141
|
-
this.parent
|
|
158
|
+
getAllEnumerationMappings(this.parent),
|
|
142
159
|
),
|
|
143
160
|
),
|
|
144
161
|
) as PurePropertyMapping[];
|
|
@@ -254,7 +271,9 @@ export class V1_ProtocolToMetaModelClassMappingSecondPassBuilder
|
|
|
254
271
|
);
|
|
255
272
|
mainTableAlias = new TableAlias();
|
|
256
273
|
mainTableAlias.name = '';
|
|
257
|
-
mainTableAlias.relation =
|
|
274
|
+
mainTableAlias.relation = guaranteeNonNullable(
|
|
275
|
+
Array.from(tables.values())[0],
|
|
276
|
+
);
|
|
258
277
|
mainTableAlias.database = Array.from(dbs.values())[0];
|
|
259
278
|
rootRelationalInstanceSetImplementation.mainTableAlias = mainTableAlias;
|
|
260
279
|
}
|
|
@@ -299,7 +318,7 @@ export class V1_ProtocolToMetaModelClassMappingSecondPassBuilder
|
|
|
299
318
|
this.context,
|
|
300
319
|
aggragetionAwareInstanceSetImplementation,
|
|
301
320
|
aggragetionAwareInstanceSetImplementation,
|
|
302
|
-
this.parent
|
|
321
|
+
getAllEnumerationMappings(this.parent),
|
|
303
322
|
new Map<string, TableAlias>(),
|
|
304
323
|
[
|
|
305
324
|
...getAllClassMappings(mapping),
|
|
@@ -83,7 +83,7 @@ export class V1_ProtocolToMetaModelConnectionBuilder
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
throw new UnsupportedOperationError(
|
|
86
|
-
`Can't build
|
|
86
|
+
`Can't build connection: no compatible builder available from plugins`,
|
|
87
87
|
connection,
|
|
88
88
|
);
|
|
89
89
|
}
|
|
@@ -105,7 +105,7 @@ export class V1_ProtocolToMetaModelConnectionBuilder
|
|
|
105
105
|
assertType(
|
|
106
106
|
this.embeddedConnectionStore.value,
|
|
107
107
|
ModelStore,
|
|
108
|
-
`Embedded
|
|
108
|
+
`Embedded model chain connection store must be 'ModelStore'`,
|
|
109
109
|
);
|
|
110
110
|
} else {
|
|
111
111
|
assertTrue(
|
|
@@ -40,7 +40,6 @@ import type { V1_GenerationSpecification } from '../../../model/packageableEleme
|
|
|
40
40
|
import type { V1_Measure } from '../../../model/packageableElements/domain/V1_Measure';
|
|
41
41
|
import { V1_buildDatabaseSchemaViewsSecondPass } from './helpers/V1_DatabaseBuilderHelper';
|
|
42
42
|
import type { V1_SectionIndex } from '../../../model/packageableElements/section/V1_SectionIndex';
|
|
43
|
-
import type { V1_ServiceStore } from '../../../model/packageableElements/store/relational/V1_ServiceStore';
|
|
44
43
|
|
|
45
44
|
export class V1_ProtocolToMetaModelGraphFifthPassBuilder
|
|
46
45
|
implements V1_PackageableElementVisitor<void>
|
|
@@ -107,12 +106,6 @@ export class V1_ProtocolToMetaModelGraphFifthPassBuilder
|
|
|
107
106
|
);
|
|
108
107
|
}
|
|
109
108
|
|
|
110
|
-
visit_ServiceStore(element: V1_ServiceStore): void {
|
|
111
|
-
this.context.graph.getServiceStore(
|
|
112
|
-
this.context.graph.buildPath(element.package, element.name),
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
109
|
visit_Mapping(element: V1_Mapping): void {
|
|
117
110
|
throw new UnsupportedOperationError();
|
|
118
111
|
}
|
|
@@ -28,7 +28,6 @@ import { Association } from '../../../../../../metamodels/pure/packageableElemen
|
|
|
28
28
|
import { ConcreteFunctionDefinition } from '../../../../../../metamodels/pure/packageableElements/domain/ConcreteFunctionDefinition';
|
|
29
29
|
import { FlatData } from '../../../../../../metamodels/pure/packageableElements/store/flatData/model/FlatData';
|
|
30
30
|
import { Database } from '../../../../../../metamodels/pure/packageableElements/store/relational/model/Database';
|
|
31
|
-
import { ServiceStore } from '../../../../../../metamodels/pure/packageableElements/store/relational/model/ServiceStore';
|
|
32
31
|
import { Mapping } from '../../../../../../metamodels/pure/packageableElements/mapping/Mapping';
|
|
33
32
|
import { Service } from '../../../../../../metamodels/pure/packageableElements/service/Service';
|
|
34
33
|
import { FileGenerationSpecification } from '../../../../../../metamodels/pure/packageableElements/fileGeneration/FileGenerationSpecification';
|
|
@@ -57,7 +56,6 @@ import type { V1_PackageableConnection } from '../../../model/packageableElement
|
|
|
57
56
|
import type { V1_FileGenerationSpecification } from '../../../model/packageableElements/fileGeneration/V1_FileGenerationSpecification';
|
|
58
57
|
import type { V1_Measure } from '../../../model/packageableElements/domain/V1_Measure';
|
|
59
58
|
import type { V1_SectionIndex } from '../../../model/packageableElements/section/V1_SectionIndex';
|
|
60
|
-
import type { V1_ServiceStore } from '../../../model/packageableElements/store/relational/V1_ServiceStore';
|
|
61
59
|
|
|
62
60
|
export class V1_ProtocolToMetaModelGraphFirstPassBuilder
|
|
63
61
|
implements V1_PackageableElementVisitor<PackageableElement>
|
|
@@ -308,31 +306,6 @@ export class V1_ProtocolToMetaModelGraphFirstPassBuilder
|
|
|
308
306
|
return database;
|
|
309
307
|
}
|
|
310
308
|
|
|
311
|
-
visit_ServiceStore(element: V1_ServiceStore): PackageableElement {
|
|
312
|
-
assertNonEmptyString(
|
|
313
|
-
element.package,
|
|
314
|
-
`Service store 'package' field is missing or empty`,
|
|
315
|
-
);
|
|
316
|
-
assertNonEmptyString(
|
|
317
|
-
element.name,
|
|
318
|
-
`Service store 'name' field is missing or empty`,
|
|
319
|
-
);
|
|
320
|
-
const serviceStore = new ServiceStore(element.name);
|
|
321
|
-
const path = this.context.currentSubGraph.buildPath(
|
|
322
|
-
element.package,
|
|
323
|
-
element.name,
|
|
324
|
-
);
|
|
325
|
-
assertTrue(
|
|
326
|
-
!this.context.graph.getNullableElement(path),
|
|
327
|
-
`Element '${path}' already exists`,
|
|
328
|
-
);
|
|
329
|
-
this.context.currentSubGraph
|
|
330
|
-
.getOrCreatePackage(element.package)
|
|
331
|
-
.addElement(serviceStore);
|
|
332
|
-
this.context.currentSubGraph.setOwnStore(path, serviceStore);
|
|
333
|
-
return serviceStore;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
309
|
visit_Mapping(element: V1_Mapping): PackageableElement {
|
|
337
310
|
assertNonEmptyString(
|
|
338
311
|
element.package,
|
|
@@ -44,7 +44,6 @@ import {
|
|
|
44
44
|
V1_buildDatabaseFilter,
|
|
45
45
|
} from './helpers/V1_DatabaseBuilderHelper';
|
|
46
46
|
import type { V1_SectionIndex } from '../../../model/packageableElements/section/V1_SectionIndex';
|
|
47
|
-
import type { V1_ServiceStore } from '../../../model/packageableElements/store/relational/V1_ServiceStore';
|
|
48
47
|
import { V1_buildAssociationMapping } from './helpers/V1_AssociationMappingHelper';
|
|
49
48
|
|
|
50
49
|
export class V1_ProtocolToMetaModelGraphFourthPassBuilder
|
|
@@ -108,12 +107,6 @@ export class V1_ProtocolToMetaModelGraphFourthPassBuilder
|
|
|
108
107
|
);
|
|
109
108
|
}
|
|
110
109
|
|
|
111
|
-
visit_ServiceStore(element: V1_ServiceStore): void {
|
|
112
|
-
this.context.graph.getServiceStore(
|
|
113
|
-
this.context.graph.buildPath(element.package, element.name),
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
110
|
visit_Mapping(element: V1_Mapping): void {
|
|
118
111
|
const path = this.context.graph.buildPath(element.package, element.name);
|
|
119
112
|
const mapping = this.context.graph.getMapping(path);
|
|
@@ -73,7 +73,6 @@ import {
|
|
|
73
73
|
import type { V1_Measure } from '../../../model/packageableElements/domain/V1_Measure';
|
|
74
74
|
import type { V1_SectionIndex } from '../../../model/packageableElements/section/V1_SectionIndex';
|
|
75
75
|
import { V1_buildSection } from '../../../transformation/pureGraph/to/helpers/V1_SectionBuilderHelper';
|
|
76
|
-
import type { V1_ServiceStore } from '../../../model/packageableElements/store/relational/V1_ServiceStore';
|
|
77
76
|
|
|
78
77
|
export class V1_ProtocolToMetaModelGraphSecondPassBuilder
|
|
79
78
|
implements V1_PackageableElementVisitor<void>
|
|
@@ -216,18 +215,6 @@ export class V1_ProtocolToMetaModelGraphSecondPassBuilder
|
|
|
216
215
|
);
|
|
217
216
|
}
|
|
218
217
|
|
|
219
|
-
visit_ServiceStore(element: V1_ServiceStore): void {
|
|
220
|
-
assertNonEmptyString(
|
|
221
|
-
element.docLink,
|
|
222
|
-
`Service store 'docLink' field is missing`,
|
|
223
|
-
);
|
|
224
|
-
const serviceStore = this.context.graph.getServiceStore(
|
|
225
|
-
this.context.graph.buildPath(element.package, element.name),
|
|
226
|
-
);
|
|
227
|
-
// TODO includedStores
|
|
228
|
-
serviceStore.docLink = element.docLink;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
218
|
visit_Mapping(element: V1_Mapping): void {
|
|
232
219
|
const mapping = this.context.graph.getMapping(
|
|
233
220
|
this.context.graph.buildPath(element.package, element.name),
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
assertTrue,
|
|
20
20
|
isNonNullable,
|
|
21
21
|
assertErrorThrown,
|
|
22
|
+
guaranteeNonNullable,
|
|
22
23
|
} from '@finos/legend-shared';
|
|
23
24
|
import { CORE_ELEMENT_PATH } from '../../../../../../../MetaModelConst';
|
|
24
25
|
import { Class } from '../../../../../../metamodels/pure/packageableElements/domain/Class';
|
|
@@ -50,7 +51,6 @@ import type { V1_GenerationSpecification } from '../../../model/packageableEleme
|
|
|
50
51
|
import type { V1_Measure } from '../../../model/packageableElements/domain/V1_Measure';
|
|
51
52
|
import { V1_buildDatabaseSchemaViewsFirstPass } from '../../../transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper';
|
|
52
53
|
import type { V1_SectionIndex } from '../../../model/packageableElements/section/V1_SectionIndex';
|
|
53
|
-
import type { V1_ServiceStore } from '../../../model/packageableElements/store/relational/V1_ServiceStore';
|
|
54
54
|
import { GraphBuilderError } from '../../../../../../../graphManager/GraphManagerUtils';
|
|
55
55
|
|
|
56
56
|
export class V1_ProtocolToMetaModelGraphThirdPassBuilder
|
|
@@ -118,8 +118,8 @@ export class V1_ProtocolToMetaModelGraphThirdPassBuilder
|
|
|
118
118
|
const association = this.context.graph.getAssociation(
|
|
119
119
|
this.context.graph.buildPath(element.package, element.name),
|
|
120
120
|
);
|
|
121
|
-
const first = element.properties[0];
|
|
122
|
-
const second = element.properties[1];
|
|
121
|
+
const first = guaranteeNonNullable(element.properties[0]);
|
|
122
|
+
const second = guaranteeNonNullable(element.properties[1]);
|
|
123
123
|
association.setProperties([
|
|
124
124
|
V1_buildAssociationProperty(first, second, this.context, association),
|
|
125
125
|
V1_buildAssociationProperty(second, first, this.context, association),
|
|
@@ -157,12 +157,6 @@ export class V1_ProtocolToMetaModelGraphThirdPassBuilder
|
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
visit_ServiceStore(element: V1_ServiceStore): void {
|
|
161
|
-
this.context.graph.getServiceStore(
|
|
162
|
-
this.context.graph.buildPath(element.package, element.name),
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
160
|
visit_Mapping(element: V1_Mapping): void {
|
|
167
161
|
const path = this.context.graph.buildPath(element.package, element.name);
|
|
168
162
|
const mapping = this.context.graph.getMapping(path);
|
|
@@ -40,10 +40,7 @@ import { InferableMappingElementIdExplicitValue } from '../../../../../../metamo
|
|
|
40
40
|
import type { PackageableElementReference } from '../../../../../../metamodels/pure/packageableElements/PackageableElementReference';
|
|
41
41
|
import { PackageableElementImplicitReference } from '../../../../../../metamodels/pure/packageableElements/PackageableElementReference';
|
|
42
42
|
import type { PropertyReference } from '../../../../../../metamodels/pure/packageableElements/domain/PropertyReference';
|
|
43
|
-
import {
|
|
44
|
-
PropertyImplicitReference,
|
|
45
|
-
PropertyExplicitReference,
|
|
46
|
-
} from '../../../../../../metamodels/pure/packageableElements/domain/PropertyReference';
|
|
43
|
+
import { PropertyImplicitReference } from '../../../../../../metamodels/pure/packageableElements/domain/PropertyReference';
|
|
47
44
|
import { RootRelationalInstanceSetImplementation } from '../../../../../../metamodels/pure/packageableElements/store/relational/mapping/RootRelationalInstanceSetImplementation';
|
|
48
45
|
import { OtherwiseEmbeddedRelationalInstanceSetImplementation } from '../../../../../../metamodels/pure/packageableElements/store/relational/mapping/OtherwiseEmbeddedRelationalInstanceSetImplementation';
|
|
49
46
|
import { EmbeddedRelationalInstanceSetImplementation } from '../../../../../../metamodels/pure/packageableElements/store/relational/mapping/EmbeddedRelationalInstanceSetImplementation';
|
|
@@ -80,6 +77,7 @@ import {
|
|
|
80
77
|
import { V1_transformRelationalOperationElement } from '../from/V1_DatabaseTransformer';
|
|
81
78
|
import { V1_GraphTransformerContextBuilder } from '../from/V1_GraphTransformerContext';
|
|
82
79
|
import {
|
|
80
|
+
getAllEnumerationMappings,
|
|
83
81
|
getClassMappingById,
|
|
84
82
|
getClassMappingsByClass,
|
|
85
83
|
} from '../../../../../../../helpers/MappingHelper';
|
|
@@ -638,7 +636,9 @@ export class V1_ProtocolToMetaModelPropertyMappingBuilder
|
|
|
638
636
|
this.context,
|
|
639
637
|
embedded,
|
|
640
638
|
this.topParent,
|
|
641
|
-
this.topParent?.parent
|
|
639
|
+
this.topParent?.parent
|
|
640
|
+
? getAllEnumerationMappings(this.topParent.parent)
|
|
641
|
+
: [],
|
|
642
642
|
this.tableAliasMap,
|
|
643
643
|
),
|
|
644
644
|
),
|
|
@@ -696,7 +696,9 @@ export class V1_ProtocolToMetaModelPropertyMappingBuilder
|
|
|
696
696
|
this.context,
|
|
697
697
|
otherwiseEmbedded,
|
|
698
698
|
this.topParent,
|
|
699
|
-
this.topParent?.parent
|
|
699
|
+
this.topParent?.parent
|
|
700
|
+
? getAllEnumerationMappings(this.topParent.parent)
|
|
701
|
+
: [],
|
|
700
702
|
this.tableAliasMap,
|
|
701
703
|
),
|
|
702
704
|
),
|
|
@@ -707,7 +709,9 @@ export class V1_ProtocolToMetaModelPropertyMappingBuilder
|
|
|
707
709
|
this.context,
|
|
708
710
|
otherwiseEmbedded,
|
|
709
711
|
this.topParent,
|
|
710
|
-
this.topParent?.parent
|
|
712
|
+
this.topParent?.parent
|
|
713
|
+
? getAllEnumerationMappings(this.topParent.parent)
|
|
714
|
+
: [],
|
|
711
715
|
this.tableAliasMap,
|
|
712
716
|
),
|
|
713
717
|
),
|
|
@@ -750,10 +754,13 @@ export class V1_ProtocolToMetaModelPropertyMappingBuilder
|
|
|
750
754
|
);
|
|
751
755
|
const xStorePropertyMapping = new XStorePropertyMapping(
|
|
752
756
|
xStoreParent,
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
+
PropertyImplicitReference.create(
|
|
758
|
+
PackageableElementImplicitReference.create(
|
|
759
|
+
_association,
|
|
760
|
+
protocol.property.class,
|
|
761
|
+
),
|
|
762
|
+
property,
|
|
763
|
+
),
|
|
757
764
|
guaranteeNonNullable(sourceSetImplementation),
|
|
758
765
|
targetSetImplementation,
|
|
759
766
|
);
|
|
@@ -27,6 +27,7 @@ import { V1_ProtocolToMetaModelPropertyMappingBuilder } from '../../../../transf
|
|
|
27
27
|
import type { V1_AssociationMapping } from '../../../../model/packageableElements/mapping/V1_AssociationMapping';
|
|
28
28
|
import { V1_XStoreAssociationMapping } from '../../../../model/packageableElements/mapping/xStore/V1_XStoreAssociationMapping';
|
|
29
29
|
import { XStoreAssociationImplementation } from '../../../../../../../metamodels/pure/packageableElements/mapping/xStore/XStoreAssociationImplementation';
|
|
30
|
+
import { getAllEnumerationMappings } from '../../../../../../../../helpers/MappingHelper';
|
|
30
31
|
|
|
31
32
|
const getInferredAssociationMappingId = (
|
|
32
33
|
_association: Association,
|
|
@@ -63,7 +64,7 @@ const buildRelationalAssociationMapping = (
|
|
|
63
64
|
context,
|
|
64
65
|
relationalAssociationImplementation,
|
|
65
66
|
undefined,
|
|
66
|
-
parentMapping
|
|
67
|
+
getAllEnumerationMappings(parentMapping),
|
|
67
68
|
undefined,
|
|
68
69
|
allClassMappings,
|
|
69
70
|
),
|
|
@@ -96,7 +97,7 @@ const buildXStoreAssociationMapping = (
|
|
|
96
97
|
context,
|
|
97
98
|
xStoreAssociationImplementation,
|
|
98
99
|
undefined,
|
|
99
|
-
parentMapping
|
|
100
|
+
getAllEnumerationMappings(parentMapping),
|
|
100
101
|
undefined,
|
|
101
102
|
allClassMappings,
|
|
102
103
|
xStoreAssociationImplementation,
|
package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.ts
CHANGED
|
@@ -218,7 +218,10 @@ const buildJoinTreeNode = (
|
|
|
218
218
|
joins: { joinReference: JoinReference; joinType?: JoinType | undefined }[],
|
|
219
219
|
context: V1_GraphBuilderContext,
|
|
220
220
|
): JoinTreeNode => {
|
|
221
|
-
const joinWithJoinType =
|
|
221
|
+
const joinWithJoinType = guaranteeNonNullable(
|
|
222
|
+
joins[0],
|
|
223
|
+
`Can't build join tree node: at least one child node is expected`,
|
|
224
|
+
);
|
|
222
225
|
const res = new JoinTreeNode(
|
|
223
226
|
joinWithJoinType.joinReference,
|
|
224
227
|
joinWithJoinType.joinType,
|
|
@@ -599,7 +602,7 @@ export const V1_buildDatabaseJoin = (
|
|
|
599
602
|
selfJoinTargets.length !== 0,
|
|
600
603
|
`Can't build join of 1 table, unless it is a self-join. Please use the '{target}' notation in order to define a directed self-join`,
|
|
601
604
|
);
|
|
602
|
-
const existingAlias = aliases[0];
|
|
605
|
+
const existingAlias = aliases[0] as TableAlias;
|
|
603
606
|
const existingAliasName = existingAlias.name;
|
|
604
607
|
const existingRelationalElement = existingAlias.relation;
|
|
605
608
|
const tableAlias = new TableAlias();
|
|
@@ -628,8 +631,14 @@ export const V1_buildDatabaseJoin = (
|
|
|
628
631
|
});
|
|
629
632
|
}
|
|
630
633
|
join.aliases = [
|
|
631
|
-
new Pair<TableAlias, TableAlias>(
|
|
632
|
-
|
|
634
|
+
new Pair<TableAlias, TableAlias>(
|
|
635
|
+
aliases[0] as TableAlias,
|
|
636
|
+
aliases[1] as TableAlias,
|
|
637
|
+
),
|
|
638
|
+
new Pair<TableAlias, TableAlias>(
|
|
639
|
+
aliases[1] as TableAlias,
|
|
640
|
+
aliases[0] as TableAlias,
|
|
641
|
+
),
|
|
633
642
|
];
|
|
634
643
|
join.owner = database;
|
|
635
644
|
return join;
|
package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.ts
CHANGED
|
@@ -303,7 +303,9 @@ export const V1_resolveClassMappingRoot = (mapping: Mapping): void => {
|
|
|
303
303
|
Array.from(classToSetImplMap.entries()).forEach((entries) => {
|
|
304
304
|
const _classMappings = entries[1];
|
|
305
305
|
if (_classMappings.size === 1) {
|
|
306
|
-
const classMapping = Array.from(
|
|
306
|
+
const classMapping = Array.from(
|
|
307
|
+
_classMappings.values(),
|
|
308
|
+
)[0] as SetImplementation;
|
|
307
309
|
// ensure you are only altering current mapping
|
|
308
310
|
if (
|
|
309
311
|
classMapping.root.value === false &&
|
package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ProcessingContext.ts
CHANGED
|
@@ -43,20 +43,24 @@ export class V1_ProcessingContext {
|
|
|
43
43
|
return this.tags;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
private get lastInferredVariableList():
|
|
47
|
+
| Map<string, ValueSpecification>
|
|
48
|
+
| undefined {
|
|
49
|
+
return this.inferredVariableList.length
|
|
50
|
+
? this.inferredVariableList[this.inferredVariableList.length - 1]
|
|
51
|
+
: undefined;
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
addInferredVariables(name: string, variable: ValueSpecification): void {
|
|
51
55
|
if (!this.inferredVariableList.length) {
|
|
52
56
|
this.addVariableToNewLevel(name, variable);
|
|
53
57
|
} else {
|
|
54
|
-
this.
|
|
58
|
+
this.lastInferredVariableList?.set(name, variable);
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
flushVariable(name: string): void {
|
|
59
|
-
this.
|
|
63
|
+
this.lastInferredVariableList?.delete(name);
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
removeLastVariableLevel(): void {
|
|
@@ -203,7 +203,7 @@ export class V1_ValueSpecificationBuilder
|
|
|
203
203
|
`Applying function '${appliedFunction.function}'`,
|
|
204
204
|
);
|
|
205
205
|
if (appliedFunction.function === LET_FUNCTION) {
|
|
206
|
-
const
|
|
206
|
+
const parameters = appliedFunction.parameters.map((expression) =>
|
|
207
207
|
expression.accept_ValueSpecificationVisitor(
|
|
208
208
|
new V1_ValueSpecificationBuilder(
|
|
209
209
|
this.context,
|
|
@@ -212,11 +212,16 @@ export class V1_ValueSpecificationBuilder
|
|
|
212
212
|
),
|
|
213
213
|
),
|
|
214
214
|
);
|
|
215
|
-
const letName =
|
|
216
|
-
.values[0]
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
215
|
+
const letName = guaranteeNonNullable(
|
|
216
|
+
guaranteeType(appliedFunction.parameters[0], V1_CString).values[0],
|
|
217
|
+
);
|
|
218
|
+
const firstParam = guaranteeNonNullable(parameters[0]);
|
|
219
|
+
const variableExpression = new VariableExpression(
|
|
220
|
+
letName,
|
|
221
|
+
firstParam.multiplicity,
|
|
222
|
+
);
|
|
223
|
+
variableExpression.genericType = firstParam.genericType;
|
|
224
|
+
this.processingContext.addInferredVariables(letName, variableExpression);
|
|
220
225
|
}
|
|
221
226
|
const func = V1_buildFunctionExpression(
|
|
222
227
|
appliedFunction.function,
|
|
@@ -598,7 +603,7 @@ export function V1_buildLambdaBody(
|
|
|
598
603
|
) as VariableExpression,
|
|
599
604
|
);
|
|
600
605
|
const openVariables: string[] = [];
|
|
601
|
-
const
|
|
606
|
+
const _expressions = expressions.map((e) =>
|
|
602
607
|
e.accept_ValueSpecificationVisitor(
|
|
603
608
|
new V1_ValueSpecificationBuilder(
|
|
604
609
|
context,
|
|
@@ -608,15 +613,16 @@ export function V1_buildLambdaBody(
|
|
|
608
613
|
),
|
|
609
614
|
);
|
|
610
615
|
// Remove let variables
|
|
616
|
+
const firstExpression = guaranteeNonNullable(_expressions[0]);
|
|
611
617
|
const functionType = buildFunctionType(
|
|
612
618
|
pureParameters,
|
|
613
|
-
|
|
614
|
-
|
|
619
|
+
firstExpression.genericType?.value.rawType,
|
|
620
|
+
firstExpression.multiplicity,
|
|
615
621
|
);
|
|
616
622
|
processingContext.pop();
|
|
617
623
|
const _lambda = new LambdaFunction(functionType);
|
|
618
624
|
_lambda.openVariables = [];
|
|
619
|
-
_lambda.expressionSequence =
|
|
625
|
+
_lambda.expressionSequence = _expressions;
|
|
620
626
|
return _lambda;
|
|
621
627
|
}
|
|
622
628
|
|
|
@@ -836,7 +842,7 @@ export function V1_processProperty(
|
|
|
836
842
|
),
|
|
837
843
|
),
|
|
838
844
|
);
|
|
839
|
-
let inferredVariable: ValueSpecification;
|
|
845
|
+
let inferredVariable: ValueSpecification | undefined;
|
|
840
846
|
if (firstParameter instanceof V1_Variable) {
|
|
841
847
|
inferredVariable = guaranteeType(
|
|
842
848
|
processingContext.getInferredVariable(firstParameter.name),
|
|
@@ -846,7 +852,7 @@ export function V1_processProperty(
|
|
|
846
852
|
inferredVariable = processedParameters[0];
|
|
847
853
|
}
|
|
848
854
|
let inferredType: Type | undefined =
|
|
849
|
-
inferredVariable
|
|
855
|
+
inferredVariable?.genericType?.value.rawType;
|
|
850
856
|
if (inferredVariable instanceof AbstractPropertyExpression) {
|
|
851
857
|
inferredType = inferredVariable.func.genericType.value.rawType;
|
|
852
858
|
}
|