Skip to Content
0
Oct 01, 2019 at 12:35 PM

How to influence content of %CONSTRAINT% variable?

64 Views

When you define List of values for a column in PDM in PowerDesigner, only those values (but not their labels) can be generated into DDL. See first screenshot. I need to generate the labels as comments too.

There is a template in DBMS file (Oracle 12c), which is responsible for such a check constraint generation. It is Script\Objects\Column\AddColnChck, see second screenshot.

My question is: Is it possible to influence the way how the content of %CONSTRAINT% variable is built? Or do I have to replace it with my own template and rebuild the whole logic of this statement (null vs. not null, char values quoted vs. integer values unquoted, etc.)?

Through PD API I can acccess List of values using attribute ListOfValues in Column metaclass, but it contains all values and their labels in one big text field. I have no problem parsing to atomic values, but I don`t want to get into rewriting PD logic, which is already present in PD, but most probably only hardcoded.

Is there some PD guru, who can tell me where to modify the %CONTAINER% variable? Or at least what is the complete logic behind that?

Thank you,
Ondrej

Attachments

lov1.jpg (91.3 kB)
lov2.jpg (107.8 kB)