Skip to content

Commit 9b19d66

Browse files
authored
Add view and mat.view to puml lib (#54)
* Add view and mat.view to puml lib * Use plantuml-server:tomcat-v1.2025.2 for CI
1 parent 6c4a503 commit 9b19d66

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
POSTGRES_USER: sql
3838
POSTGRES_PASSWORD: sql
3939
POSTGRES_DB: sql
40-
- image: plantuml/plantuml-server:latest
40+
- image: plantuml/plantuml-server:tomcat-v1.2025.2
4141
steps:
4242
- checkout
4343
- run: sudo apt update

puml-lib/db_ent.puml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
!return 'entity "**' + $name + '**"' + " as " + $name
1919
!endfunction
2020
21+
!function view($name, $materialized=false)
22+
!if ($materialized == false)
23+
!return 'entity "**' + $name + ' **<color:SkyBlue>**(V)**</color>"' + " as " + $name
24+
!else
25+
!return 'entity "**' + $name + ' **<color:DarkBlue>**(MV)**</color>"' + " as " + $name
26+
!endif
27+
!endfunction
28+
2129
!procedure enum($name, $variants)
2230
!$list = %splitstr($variants, ",")
2331
@@ -35,5 +43,7 @@
3543
|<color:#aaaaaa><&key></color>| Foreign Key |
3644
| &#8226; | Mandatory field (Not Null) |
3745
| <color:purple>**(E)**</color> | Enum |
46+
| <color:SkyBlue>**(V)**</color> | View |
47+
| <color:DarkBlue>**(MV)**</color> | Materialized View |
3848
endlegend
3949
!endprocedure

0 commit comments

Comments
 (0)