Click the Preview tab in an object property sheet to view the SQL code associated with the object before it is generated. The code displayed is read-only and reflects the options selected in the Database Generation dialog box.
For more information on database generation options, see Generating a Database from a PDM.
The text in the script preview is color coded as follows:
You can use the following tools and keyboard shortcuts from the Preview toolbar:
For more information on extended model definitions used for generation, see "Extended Model Definitions" in the Resource Files and the Public Metamodel chapter of the Customizing and Extending PowerDesigner manual.
If you click the Change Generation Options tool, the Generation Options dialog box is displayed. You can change generation options and preview their effect on the code.
If you click the Ignore Generation Options tool, the preview ignores generation options selected by using the Change generation options tool but uses a predefined set of options.
Selected tool |
Effect on generation options |
Effect on preview |
---|---|---|
Change generation options |
You can select generation options |
Visible in Preview if options are applicable |
Ignore generation options |
Generation options currently selected are overridden by predefined set of options |
Only predefined options are visible in Preview |
Change generation options + Ignore generation options |
You can select generation options |
Changes ignored in Preview |
The predefined set of generation options selects these items:
Generation Option Tab |
Selected items |
---|---|
Tables and Views |
All items except drop options |
Keys and Indexes |
All items except options represented differently in some DBMS. For example, if a database is auto indexed, the index options corresponding to the keys are not selected |
Database |
All items except drop options |
Options |
All user-defined options are used |
In the SQL Editor or SQL Preview tab, you can add and remove bookmarks at specific points in the SQL script and then navigate forwards or backwards from bookmark to bookmark:
Keyboard shortcut |
Description |
---|---|
Ctrl + F2 |
Adds a new bookmark. A blue bookmark box is displayed. If you repeat this action from the same position, the bookmark is deleted and the blue marker disappears |
F2 |
Jumps to next bookmark |
Shift + F2 |
Jumps to the previous bookmark |
Note that bookmarks are not printable and are lost if you use the Refresh, Change Generation or Ignore Generation options.