Code Snippets
Save queries to the local configuration database for later use. You can edit the saved snippets and add placeholders for such things a current schema, current table, and column selections within the "Apply Snippet" dialog.
To edit an existing Snippet, double-click the snippet name in the listbox to the left. Also, in the main window's statement log, you can right-click an item and select 'Add Snippet' to open up the Snippet Manager with the selected query already entered.
PlaceHolders Tags
To add a placeholder to the snippet code body, either double-click an item in the Placeholder list or drag a placeholder into the snippet. The placeholders are surrounded by curly braces inside the code body textarea.
- SCHEMA
The selected database/schema. - TABLE1
The selected table. - COLS1
The list of columns checked in the leftmost checkbox column in the Apply Snippet dialog. - COLS2
The list of columns checked in the rightmost checkbox column in the Apply Snippet dialog. - COLS1_FIRST
The first (top) checked column in the leftmost checkbox column in the Apply Snippet dialog. - COLS2_FIRST
The first (top) checked column in the rightmost checkbox column in the Apply Snippet dialog. - COLS1_NAMES
A list of literal strings of the leftmost checkbox column in the Apply Snippet dialog. - COLS2_NAMES
A list of literal strings of the rightmost checkbox column in the Apply Snippet dialog. - ORDER_BY
An Order By clause formed from the columns in the leftmost checkbox column in the Apply Snippet dialog. - WHERE
A Where clause listing name/value pairs where the value is entered in the 'Where' column in the Apply Snippet dialog.
Apply Snippets
Once saved, use the Apply Snippet dialog to apply the snippet to the selected table and then execute. The columns for the selected table appear to the right of the snippet list. You can check columns or click and type a selection criteria under the WHERE VALUE column. Generally, the first checkbox column generates the column list, though it depends on whether the COLS1 or COLS2 placeholder is used. The second column of checkboxes is used to generate the ORDER BY clause.