After connecting, the main window appears. It holds a ribbon at the top, one or more editor documents in the middle, and a row of dockable panels below. The picture shows a statement on the sample database, with the rows it returned in "Results" below it.
![[20260811-qt-main-window.png]]
## Ribbon
The ribbon has two tabs. Above them sits a quick access toolbar with "Save".
"General" carries the daily work:
- Actions: "Execute" runs the statement under the cursor, "Execute All" runs every statement in the document.
- Connection: a split button naming the database currently connected as `<group>\<database>`, a menu to choose the [[Invantive UniversalSQL/General/Partitioning|partitions]] to work on, and "Preferences".
- Tools: "Data Cache", "Invantive Data Loader" and "Describe Object".
- Help: "Product Forums" and a split button "Help".
Running a whole document is licensed apart from running one statement. From release 27.0 onwards "Execute All" needs a licence which covers the function `itgen_querytool_execute_script`, where "Execute" needs `itgen_querytool_execute`. A licence without it leaves the button in the ribbon and stops the run with a message naming the function to acquire. On a connection to an Invantive repository the function must be granted to the user as well, as every function of such a repository is. The statements handed over on the command line run as a script too and need the same function; see [[Invantive Query Tool/Command Line Options|Command Line Options]] and [[Licensing]].
"Editor" carries the text handling of the document:
- Undo: "Undo" and "Redo".
- Clipboard: "Cut", "Copy" and "Paste".
- Edit: "Find", "Replace" and "Select All".
- Goto Line.
- View: "Wrap char", "Wrap word" and "Wrap none", and a list "Language" which sets the syntax highlighting of the document.
From release 27.0 onwards the highlighting of a document set to Invantive UniversalSQL follows the vocabulary of the connection instead of a fixed list of words: keywords, functions, data types, constants, [[Invantive UniversalSQL/Packages/Packages|packages]], the statements of the application itself and the names of the reachable tables and views each get a colour of their own, and the completion offered while typing covers all of them together. Connecting to another database refreshes the vocabulary, so the words of the platform actually connected to are the ones coloured.
## Documents
Statements are written in documents which appear as tabs, starting with `New.sql`. A tab whose name carries an asterisk holds changes which have not been saved. Each tab closes on its own.
## Panels
Below the documents sit the panels, each of which can be docked, hidden or pinned:
- [[Invantive Query Tool/Available Objects|Available Objects]]: the tables, views, functions and procedures reachable through the current connection;
- [[Invantive Query Tool/Results|Results]]: the rows returned by the last statement;
- [[Invantive Query Tool/History|History]]: the statements executed earlier, with what each of them cost;
- [[Invantive Query Tool/DBMS Output|DBMS Output]]: the output written by a [[Invantive UniversalSQL/Grammar/Statement Types/PSQL Block|PSQL block]];
- [[Invantive Query Tool/Explain Plan|Explain Plan]]: how the engine intends to execute a statement;
- [[Invantive Query Tool/Trace|Trace]]: the trace messages the application writes.
Two panels are shared by all documents: "Available Objects", since one database is connected at a time, and "History", which lists the statements of the whole session whichever document they were executed from. The history outlives the session: it is kept per user in `sqlhistory.json` in `%USERPROFILE%\Invantive\Prd\Invantive Query Tool` and is read again at the next start, up to the 2,500 most recently executed statements. From release 27.0 onwards the contents of that file are JSON; a history still held in XML format is read once and written back as JSON, so nothing is lost on upgrading. The other four belong to the document being edited: the rows in "Results", the output in "DBMS Output", the plan in "Explain Plan" and the lines in "Trace" are those of that document and remain while another document is worked on, so switching between documents and back shows each document's own again, with the column widths and the scroll position as they were left. The panel being read stays selected while switching from one document to another.
## Searching in a Panel
From release 27.0 onwards every panel except "Explain Plan" carries a search field at the right-hand end of its own toolbar, with a funnel or a magnifying glass in front of it. There are two kinds, and which kind a panel has follows from what it shows.
"Available Objects" and "History" leave out what does not match:
- the tree shows only the objects whose name contains the text, where the name of an object includes the data container, the catalog and the schema it belongs to as well as the description it is shown with, so a table is found by its description as much as by its code;
- the history shows only the statements whose text contains the text.
The button behind the field empties it, as does the Escape key.
"Results", "DBMS Output" and "Trace" go to what matches: the first occurrence is selected as soon as the text is typed, and the two buttons behind the field move to the next and the previous occurrence, as do the Enter key and F3, with Shift for the previous one. After the last occurrence the search continues at the first.
These three panels also carry the switch "Show Only Matches", off by default, which leaves out everything that does not match instead of moving to it: of "Results" and "Trace" the rows which hold the text in one of their columns stay, of "DBMS Output" the lines which hold it. The row numbers stay as they were, so the place of a row in the whole answer remains visible, and the two navigation buttons are unavailable while the switch is on, there being nothing left to step to:
![[20260903-qt-results-only-matches.png]]
Upper and lower case are treated alike in every panel, and a text which occurs nowhere turns red in the field. A value which is not a text - a number, a date, a flag - is searched as the value itself reads rather than as it is shown, so a date is matched in the notation `2026-09-03 17:45:57`.
In "Results" the rows retrieved so far are searched. A statement whose answer is read further as the user scrolls is not read ahead to search it, since that would mean retrieving the remainder of an arbitrarily large result set on a keystroke; searching again after scrolling covers what has been read by then. The same holds for "Show Only Matches": the rows retrieved so far are the ones left out or left standing, and the rows which have not been retrieved stay in view below them.
## Appearance
The main window renders light or dark, following the app mode of Microsoft Windows; see [[Appearance]].