Session 4: Working with Code Workbench
Go Up to Rapid SQL Tutorial exercises
The Code Workbench lets you configure resources for two SQL Editor features:
- Code Templates
- Auto Replace
Code templates are complete code blocks that can be easily added to open windows or scripts with a few keystrokes. When you type CTRL+SPACE, the Code Assist menu opens, letting you select a code template for insertion in the editor window.
Auto Replace lets you define shortcuts consisting of a few characters that represent longer character strings. Instances of these Auto Replace expressions are automatically replaced by the replacement string on activation events such as typing SPACE, TAB, or RETURN. This feature is useful for creating shortcuts for one-line commands or SQL statement subsets, or even to detect and fix common typographical errors such as teh for the.
For example, consider an Auto Replace definition with an expression of sel to represent Select * From:
If the associated activation event includes a SPACE then on typing sel followed by pressing SPACE, the following replacement occurs:
Rapid SQL loads a default set of Auto Replace and Code template definitions at startup, but you can also add, edit, and delete definitions. Also, you can save sets of definitions to file and subsequently load specific sets of definitions, allowing you to customize your templates to different platforms or development projects.
To invoke Code Workbench settings:
- Select Tools > Code Workbench.
- Inspect the Code Templates and Auto Replace tabs.
- Click OK.
Proceed to Session 5: Building a Database Project.