Skip to content

Commit

Permalink
Port Relational Mapper Post processor protocol change to v1_33_0 (#2834)
Browse files Browse the repository at this point in the history
* Update metamodel_relational.pure

* Update connection_relational.pure
  • Loading branch information
mrudula-gs authored May 7, 2024
1 parent a0f7fb0 commit bed83e1
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,18 +323,55 @@ Class meta::protocols::pure::v1_33_0::metamodel::store::relational::element::Tab

}

Class meta::protocols::pure::v1_33_0::metamodel::store::relational::element::SchemaPtr extends meta::protocols::pure::v1_33_0::metamodel::store::relational::element::RelationalElement
{
database : String[1];
schema : String[1];
mainTableDb: String[1];
}

Class meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::Mapper
{
_type: String[1];
from: String[1];
to: String[1];
}

Class meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::RelationalMapper
{
databaseMappers : meta::protocols::pure::v1_33_0::metamodel::store::relational::DatabaseMapper[*];
schemaMappers : meta::protocols::pure::v1_33_0::metamodel::store::relational::SchemaMapper[*];
tableMappers : meta::protocols::pure::v1_33_0::metamodel::store::relational::TableMapper[*];
}

Class meta::protocols::pure::v1_33_0::metamodel::store::relational::DatabaseMapper
{
database : String[1];
schemas: meta::protocols::pure::v1_33_0::metamodel::store::relational::Schema[*];
}

Class meta::protocols::pure::v1_33_0::metamodel::store::relational::SchemaMapper
{
from : meta::protocols::pure::v1_33_0::metamodel::store::relational::Schema[1];
to : String[1];
}

Class meta::protocols::pure::v1_33_0::metamodel::store::relational::TableMapper
{
from : meta::protocols::pure::v1_33_0::metamodel::store::relational::Table[1];
to : String[1];
}

Class <<typemodifiers.abstract>> meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::MapperPostProcessor extends meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::PostProcessor
{
mappers: meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::Mapper[*];
}

Class <<typemodifiers.abstract>> meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::RelationalMapperPostProcessor extends meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::PostProcessor
{
relationalMappers: String[*];
}

Class meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::TableNameMapper extends meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::Mapper {
schema: meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::SchemaNameMapper[1];
}
Expand All @@ -354,4 +391,4 @@ Class meta::protocols::pure::v1_33_0::metamodel::store::relational::SchemaNameMa
{
in:String[1];
out:String[1];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,11 @@ function meta::protocols::pure::v1_33_0::transformation::fromPureGraph::connecti

function meta::protocols::pure::v1_33_0::transformation::fromPureGraph::connection::transformPostProcessors(processors:meta::pure::alloy::connections::PostProcessor[*], extensions:meta::pure::extension::Extension[*]):meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::PostProcessor[*]
{
$processors->map(processor |
$processor->match([
m:meta::pure::alloy::connections::MapperPostProcessor[1] | ^meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::MapperPostProcessor(
_type = 'mapper',
mappers = transformPostProcessorMappers($m.mappers))
]->concatenate($extensions.serializerExtension('v1_33_0')->cast(@meta::protocols::pure::v1_33_0::extension::SerializerExtension_v1_33_0).moduleSerializerExtension('relational')->cast(@meta::protocols::pure::v1_33_0::extension::RelationalModuleSerializerExtension).transfers_connection_transformPostProcessors)->toOneMany())
);
$processors->map(processor | $processor->match([
m:meta::pure::alloy::connections::MapperPostProcessor[1] | ^meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::MapperPostProcessor(_type = 'mapper', mappers = transformPostProcessorMappers($m.mappers)),
rm:meta::pure::alloy::connections::RelationalMapperPostProcessor[1] | ^meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::RelationalMapperPostProcessor(_type = 'relationalMapper', relationalMappers = $rm.relationalMappers->map(relationalMapper | $relationalMapper->elementToPath()))
]->concatenate($extensions.serializerExtension('v1_33_0')->cast(@meta::protocols::pure::v1_33_0::extension::SerializerExtension_v1_33_0).moduleSerializerExtension('relational')->cast(@meta::protocols::pure::v1_33_0::extension::RelationalModuleSerializerExtension).transfers_connection_transformPostProcessors)->toOneMany())
);
}

function meta::protocols::pure::v1_33_0::transformation::fromPureGraph::connection::transformPostProcessorMappers(mappers:meta::pure::alloy::connections::Mapper[*]):meta::protocols::pure::v1_33_0::metamodel::store::relational::postProcessor::Mapper[*]
Expand Down

0 comments on commit bed83e1

Please sign in to comment.