The GRT Globals Tree and its Classes


Much of the internal data handled by Workbench is kept in a structure accessible from plugins and scripts, known as a GRT Globals Tree. Configuration data, model information, SQL editor instances are accessible from it. You can browse this tree in the Scripting Shell window, in the Globals sidebar tree. The sidebar also has access to the list of available classes and modules, which the functions they export.

In Python, the Globals Tree root node can be accessed from the root variable in the 'grt' module:

import grt

All object nodes descend from a base GrtObject class. It has a name and owner fields. The owner field must alway point to the object that precedes it in the globals tree hierarchy, eg: a column is owned by a table, a table is owned by a schema, a schema by a catalog and so on up to the root node, which is an instance of workbench_Workbench.

Key Globals Tree Nodes


Query Editor