The SQL Query Editor View

The SQL Query Editor is a view, not an editor in the Eclipse sense, so it won't appear mixed with the other editors in the editors zone of the workspace. Its function is allow the user to introduce and to edit SQL sentences and to execute them against the databases defined in Quantum. It looks like this when you have written something on it:

As you can see, the editor highlights some SQL syntax features. The colors of the highlighted text are selectable in the Quantum preferences.

When you want to execute your SQL query, you select the bookmark against which to execute using the little black button near the green button (the execute button). When you click on it, a list of bookmarks appear for you to select. The currently selected appears above, separated from the rest by a line.

.

If you simply hit the green execute button, the last selected bookmark will be used to execute against. That selected bookmark will also be shown as a window tip if you hover the mouse pointer over the execute button. This selected bookmark will change also if you double-click on a Recent Query on any bookmark (it will change to be the parent bookmark of the selected query). If the selected bookmark is not opened, Quantum will try to open it and execute the statement afterwards.

If your SQL statement return some results, the results will be displayed in the Quantum Table View.

You can write several queries, separated by semicolons. Quantum will send then one after another to the database JDBC driver to be executed. If you want to execute only one query or a part of them, you have the option to select the text and hitting the execute button. If there is something selected in the Query view, when the execute button is hit, only the selected text will be executed.

When you execute a query, the resulting status of the query and the time used, is displayed on the status bar of Eclipse. If the database reports any error, the message reported is displayed in a message box.

Next to the execute button, there is an "erase" button with an eraser icon on it . Pressing this button will clear the SQL Query view from all text.

The toolbar menu

At the right side of the toolbar, there is an expandable menu with some options.

You can Import a Query from an external file, and save (Export) one that you have written to a file. You can change your AutoCommit selection on the active bookmark, and execute a Rollback or a Commit, as convenience functions. Or course the rollback will do nothing if you have AutoCommit selected (the default). For more options on AutoCommit, see the Preferences Help.