Creating Code Templates

From RapidSQL
Jump to: navigation, search

Go Up to Working With Code Workbench Code Templates

In order to have shortcuts substituted with code templates in the SQL Editor, you must first designate the keystroke that triggers the substitution. The Code Workbench window’s Code Templates tab lets you maintain your list of code templates and their associated shortcuts.

To access the Code Templates tab

  1. Select Tools > Code Workbench and select the Code Templates tab.

To add or edit a code template

  1. Click Add or Edit to open the Edit Code Template expression dialog.
  2. In the Shortcut box, type a shortcut of your choosing (or replace the existing one).
  3. In Description, type a comment about this code template.
  4. In Platform assign the template to a specific DBMS platform. Groups and sorts in the Code Templates tab help you browse available code templates from an open, editable window (ISQL, text, HTML, Java, etc.).
  5. In Type assign the template to a specific code type. You can type or select a type. Groups and sorts in the Code Templates tab and helps you browse available code templates from an open, editable window (ISQL, text, HTML, Java, etc.).
  6. In the Template window, type or replace the block of code.
  7. Click OK.
    Code Workbench creates the template and displays it on the Code Templates Tab.

To delete a code template

  1. Select a template from the list, click Delete, and confirm when prompted.

For related information, see the following topics: