The main window holds a toolbar at the top, the query tabs in the middle, the objects, results and messages underneath, and a status bar at the bottom. The divider between the query tabs and the lower half can be moved. ![[20260806-qtm-main-window.png]] ## Toolbar - "Log in" opens a database; see [[Log on]]. The name of the database in use is shown at the right of the toolbar. - "Execute" runs the statement being worked on; see [[Executing Statements]]. - "Execute All" runs every statement in the tab. "Execute" and "Execute All" become available as soon as a database is open, and are unavailable before that. ## Menu On Microsoft Windows and Linux the menu is a bar directly under the title of the window. On MacOS it is in the menu bar of the screen, as every application there. - "File" holds "New Tab", "Open", "Save", "Save As", "Close Tab" and "Close window". - "Edit" holds "Undo", "Redo", "Cut", "Copy", "Paste" and "Find". They apply to the field that has the cursor, otherwise to the SQL editor. "Find" opens the search bar of the editor. - "Selection" holds "Select All" and "Select Current Statement". The latter selects exactly the statement "Execute" would run. - "Query" holds "Log in", "Discover Databases", "Execute" and "Execute All". - "Window" holds "Minimize", "Zoom" and "Language"; see [[User Interface Language]]. - "Help" opens the product documentation and the product forums in the browser, and shows "About Invantive Query Tool" with the version, the edition and the contact details belonging to the licence. On MacOS that last entry is in the application menu instead, as the platform prescribes. The keyboard shortcuts behind the menu entries use the Control key on Microsoft Windows and Linux and the Command key on MacOS. So the shortcut of "New Tab" is `Ctrl+N` respectively `⌘N`, and the statement being worked on is executed with `Ctrl+Enter` respectively `⌘⏎`. ## Query Tabs Each query tab holds its own statement, its own results and its own messages. The tab marked "+" opens a new tab; there is always at least one tab. A tab whose statement has been changed since it was opened or saved carries an asterisk behind its name. Closing such a tab asks whether the changes may be discarded. A tab can not be closed while it is executing. Closing the last tab opens an empty one. "Open" and "Save As" work with `.sql`, `.isql` and `.txt` files. A file is opened in the current tab when it is still empty, and in a new tab otherwise. After saving, the tab carries the name of the file. Tabs execute independently: a long running statement in one tab does not block work in another. Within one tab only one statement runs at a time. ## SQL Editor The editor shows line numbers and colours the SQL. It is read-only until a database is open. Above the editor a bar appears while a statement runs, reporting what the engine is doing and how long it has been running, with a button to cancel; see [[Executing Statements]]. ## Objects, Results and Messages The lower half holds three tabs: - "Objects" lists what the database offers; see [[Available Objects]]. - "Results" shows the result of the statement of the query tab in use; see [[Results]]. - "Messages" shows what happened, newest first, each line preceded by the time. Errors are shown here in full, next to the window reporting them. "Results" and "Messages" follow the query tab in use; "Objects" describes the database and is therefore the same for every tab. ## Status Bar The status bar reports the state of the last action: the database that was opened, the statement that is running, how long it took and how many rows it produced, or the reason why something did not happen.