Populate Persistent and Column properties from reversing DDL

General discussions about code engineering

Moderator: Moderators

Populate Persistent and Column properties from reversing DDL

Postby jbidleman@caci.com » Fri Jan 19, 2018 9:42 am

Hello,

I am trying to reverse DDL I have and I was wondering if there is a way to specify or map where information is populated in the table and column specifications. For example, in my DDL, if I have the following statement to create an Oracle comment:

COMMENT ON TABLE XYZ_VENDOR IS 'This is the vendor table';

It will populate 'This is the vendor table' in the Documentation specification for the table property. Is there a way to specify which property contains this description or map to another property instead of Documentation.

Additionally, in my DDL I have ALTER statements to define foreign keys, however I do not see these showing up in either the table or column specifications.

ALTER TABLE XYZ_ADDR_LEVL_VEND ADD FOREIGN KEY (PARN_OF_VEND_ID) REFERENCES XYZ_VENDOR (UIDY);

Ultimately I am trying to create tables by reversing my DDL and display those table and columns properties in a Generic Table.

Thank you!
jbidleman@caci.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Fri Jan 19, 2018 9:21 am

Re: Populate Persistent and Column properties from reversing DDL

Postby gedkvi » Mon Jan 22, 2018 9:27 am

Hello,

I think I understood what you are trying to achieve. Please check the comments below.

I am trying to reverse DDL I have and I was wondering if there is a way to specify or map where information is populated in the table and column specifications. For example, in my DDL, if I have the following statement to create an Oracle comment:

This piece of information is non configurable. The COMMENT statement is parsed and transitioned to the model as the documentation of the element(in your case Table). But it is possible to display the documentation in a Generic table.

Additionally, in my DDL I have ALTER statements to define foreign keys, however I do not see these showing up in either the table or column specifications.

Foreign keys, primary keys etc. are reversed to constraint elements. Find them in the Containment tree under the table model. If you can't find them, maybe there was an issue with reverse.
table.png


This is a sample I have used:
Code: Select all
CREATE TABLE supplier
(
  supplier_id numeric(20),
  supplier_name varchar2(100)
);

COMMENT ON TABLE supplier IS 'This is the vendor table';
ALTER TABLE supplier ADD CONSTRAINT supplier_pk PRIMARY KEY (supplier_id);


This is the result:
reversed_sample.png


The sample project file is attached. I hope this covers your case to show all tables with their documentation and their columns.

Sincerely,
No Magic Customer Support
You do not have the required permissions to view the files attached to this post.
gedkvi
Customer Support
Customer Support
 
Posts: 55
Posts Rating:7
Joined: Wed Sep 16, 2015 11:25 am


Return to Code engineering

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron