Available Objects
The "Available Objects" pane lists what the database in use offers. It is filled as soon as a database is opened and describes the whole database, so it is the same for every query tab.
The tree holds:
- the tables, views, table functions, synonyms, triggers, functions and procedures of every data container of the database;
- the PSQL packages of a data container and the functions in them, for the platforms that offer packages; see Packages;
- the functions and procedures of the data dictionary;
- the views of the data dictionary.
A connection which executes native SQL carries no PSQL packages: every statement of such a connection is handed to the platform itself, which does not know them. As of release 27.0 they are left out of the tree there.
Such a connection carries the packages, the procedures and the functions of the platform instead, as of release 27.0. They stand in the "Packages" group of the schema they belong to, and a package holds its own routines below it; Oracle, Microsoft SQL Server, PostgreSQL and MySQL report them. An overloaded name stands once per signature, numbered behind the name. Double-clicking one writes the call that platform takes.
Under a schema the objects stand apart by kind, as of release 27.0: "Tables" holds everything which can be selected from and "Packages" the routines of the platform. A group which would hold nothing is not shown. Selecting a procedure or a function of the platform shows its signature underneath the tree: the name it is called by and its parameters with their type and direction.
The tree only shows a level when it distinguishes anything: the data container is left out when the database holds one, and a catalog or schema is left out when it is unnamed or when there is only one of them. Selecting an object shows its description underneath the tree.
Double-clicking an object, or pressing Enter on it, puts it in the editor:
- On an empty spot in the editor a whole statement is inserted: a
selectfor a table or view, and anexecfor a function, a procedure or a package. - Inside a statement only the name of the object is inserted, at the position of the cursor.
A table function is inserted with its parameters as placeholders. The name is qualified with the data container when the object is not in the container in use, and a limit is added when the platform needs one to keep the result workable.
Searching the Tree
The box "Search" above the tree leaves only the objects whose name contains the text. The search starts at two characters, after a short rest in the typing or at once on Enter, and upper and lower case are treated alike. What is compared is the name of an object together with the names of the levels above it, the data container, the catalog, the schema and the group, so the name of a schema selects everything in it. The label an object carries in brackets is part of it.
An object which matches is shown with everything below it, and the levels above a match are shown as the way to it and opened, as long as the result is no larger than 2,000 entries. Below the box the number of objects is shown, such as "1 shown of 154 objects". The text turns red when nothing matches. "Clear", or the Escape key in the box, empties it and shows everything again. The box does not search the columns of an object.
Columns
A table, a view and a table function can be opened. Its columns are fetched from the platform at that moment, and not for the whole tree beforehand, which would be a hundred thousand entries for a large database. A column shows its name and its data type. Selecting one shows underneath the tree its name, its data type, whether it is optional, its label and what its documentation says. Double-clicking a column, or pressing Enter on it, puts the name of the column in the editor at the cursor. A table alias is not added, since the product does not know the alias the table has in the statement.
Invantive Query Tool for Microsoft Windows shows the columns of the object in a pane under the tree, and does not insert a column.
