-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add, edit and delete entity inheritances in the text representation (#77
) - Extend grammar with 'inherits' keyword and super entities - Ensure proper serialization and cycle detection validation - Add test cases - Created example entity inheritance structure with system diagram. Co-authored-by: Harmen Wessels <[email protected]>
- Loading branch information
1 parent
ff0669f
commit 890a051
Showing
24 changed files
with
651 additions
and
332 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
examples/mapping-example/ExampleDWH/diagrams/ProductInheritance.system-diagram.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
systemDiagram: | ||
id: ProductInheritance | ||
name: "ProductInheritance" | ||
nodes: | ||
- id: ExampleDWH_ProductNode | ||
entity: ExampleDWH.Product | ||
x: 242 | ||
y: 33 | ||
width: 154.649658203125 | ||
height: 116 | ||
- id: ExampleDWH_NewEntityNode | ||
entity: ExampleDWH.DigitalProduct | ||
x: 187 | ||
y: 275 | ||
width: 154.22557544708252 | ||
height: 73.93824672698975 | ||
- id: PhysicalProductNode | ||
entity: PhysicalProduct | ||
x: 429 | ||
y: 275 | ||
width: 156.57902002334595 | ||
height: 136 | ||
- id: PerishableProductNode | ||
entity: PerishableProduct | ||
x: 429 | ||
y: 495 | ||
width: 155.22567415237427 | ||
height: 73.93824672698975 | ||
- id: SomeProductNode | ||
entity: ExampleOtherModel.SomeProduct | ||
x: 671 | ||
y: 352 | ||
width: 207.14583730697632 | ||
height: 55.33333396911621 |
16 changes: 16 additions & 0 deletions
16
examples/mapping-example/ExampleDWH/entities/DIgitalProduct.entity.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
entity: | ||
id: DigitalProduct | ||
name: "DigitalProduct" | ||
inherits: | ||
- Product | ||
attributes: | ||
- id: Attribute | ||
name: "ProductID" | ||
datatype: "Integer" | ||
identifier: true | ||
- id: SizeInKB | ||
name: "SizeInKB" | ||
datatype: "Float" | ||
- id: DownloadURL | ||
name: "DownloadURL" | ||
datatype: "Varchar" |
15 changes: 15 additions & 0 deletions
15
examples/mapping-example/ExampleDWH/entities/PerishableProduct.entity.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
entity: | ||
id: PerishableProduct | ||
name: "PerishableProduct" | ||
description: "A product with an expiration date" | ||
inherits: | ||
- PhysicalProduct | ||
- ExampleOtherModel.SomeProduct | ||
attributes: | ||
- id: ProductID | ||
name: "ProductID" | ||
datatype: "Integer" | ||
identifier: true | ||
- id: ExpirationDate | ||
name: "ExpirationDate" | ||
datatype: "Varchar" |
22 changes: 22 additions & 0 deletions
22
examples/mapping-example/ExampleDWH/entities/PhysicalProduct.entity.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
entity: | ||
id: PhysicalProduct | ||
name: "PhysicalProduct" | ||
inherits: | ||
- Product | ||
attributes: | ||
- id: ProductID | ||
name: "ProductID" | ||
datatype: "Integer" | ||
identifier: true | ||
- id: WeightInKG | ||
name: "WeightInKG" | ||
datatype: "Float" | ||
- id: Width | ||
name: "Width" | ||
datatype: "Integer" | ||
- id: Attribute12 | ||
name: "Height" | ||
datatype: "Integer" | ||
- id: Depth | ||
name: "Depth" | ||
datatype: "Integer" |
17 changes: 17 additions & 0 deletions
17
examples/mapping-example/ExampleDWH/entities/Product.entity.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
entity: | ||
id: Product | ||
name: "Product" | ||
attributes: | ||
- id: Attribute | ||
name: "ProductID" | ||
datatype: "Integer" | ||
identifier: true | ||
- id: Attribute1 | ||
name: "Name" | ||
datatype: "Varchar" | ||
- id: Attribute12 | ||
name: "Description" | ||
datatype: "Varchar" | ||
- id: Attribute123 | ||
name: "Price" | ||
datatype: "Float" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
examples/mapping-example/ExampleOtherModel/SomeProduct.entity.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
entity: | ||
id: SomeProduct | ||
name: "SomeProduct" | ||
attributes: | ||
- id: SomeProductAttribute | ||
name: "SomeProductAttribute" | ||
datatype: "Varchar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "ExampleOtherModel", | ||
"version": "1.0.0" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.