Prev Next

Edit DDL Templates

The DDL Template Editor provides the ability to change the templates that the system uses while generating DDL from a data model. It applies the facilities of the Common Code Editor, including Intelli-sense for the various macros. For more information on Intelli-sense and the Common Code Editor, see the Editing Source Code topic.

Access

Ribbon

Code > Schema > DDL > Edit the DB Schema (DDL) Templates

Select and Edit Templates

Option

Action

See also

Language

Click on the drop-down arrow and select the database type (Database Management System).

New Database

Click on this button to create a new set of templates for a non-standard DBMS.

The 'Input' dialog displays, on which you type the name of the new DBMS for which you are creating templates.

This updates the 'Language' field.

Template

Displays the contents of the selected template, and provides the editor for modifying these contents.

Templates

Lists the base DDL templates, Click on a template name to display and edit the template contents; the name of the selected  template is highlighted.

The 'Modified' field indicates whether you have modified the default template originally supplied with the system.

Stereotype Overrides

Lists any stereotyped templates that exist for the currently-selected base template.

The 'Modified' field indicates whether you have modified a default stereotyped template.

Add New Custom Template

Click on this button to display the 'Create New Custom Template' dialog, on which you select the template type from a drop-down list, and type in a name for the template.

The template type becomes a prefix for the name; for example:

     Namespace_MyDDLTemplate

Add New Stereotyped Override

Select a base template and click on this button to display the 'New Template Override' dialog for adding a stereotyped template for the selected template. From the drop-down lists, select the Class and/or Feature stereotype for which to apply the override template.

Get Default Template

Click on this button to refresh the editor display with the default version of the selected template. (This does not delete the changed version of the template.)

Save

Click on this button to overwrite the selected template with the updated contents of the Template panel.

Delete

If you have overridden the selected template, click on this button to delete the overridden template and replace it with the corresponding default DDL template.

Notes

  • User-modified and user-defined DDL Templates can be imported and exported as Reference Data (see the Sharing Reference Data topic)
  • Any user-defined templates for a database type are listed in the 'Export Reference Data' dialog in the 'Code, DDL, Transformation & CSV Templates' table, identified by the DBMS name with the suffix _DDL_Template - if no user-defined templates exist for a DBMS, there is no entry for the DBMS in the dialog
  • You must also define any appropriate data types for the DBMS and, if exporting the templates as Reference Data, you must export the 'Model Data Types - Code and DDL' table as well

Learn more