6.9. Object search
The object search widget is a tool that provides quick object searching over the model. This feature is very useful when the working model has a huge number of objects, making it almost impossible to easily locate a specific item using the conventional model objects widget or the other available navigation tools. This widget works like an ordinary text search, where you can filter results by object type and some other attributes, but it can also highlight objects in different ways to show their location on the database model.
The objects are scanned by using a name pattern which can be a fixed string, a wildcard string, or a regular expression in the form accepted by the Qt framework. Once the results are retrieved the user can interact with the items by double-clicking them to open the respective properties dialog, selecting one or more items and right-clicking to bring the context menu, or even highlighting them on the model if the proper option is checked. Details about the fields and controls of this widget are described as follows.
1234567
| Object search | ||
|---|---|---|
| # | Field | Description |
| 1 | Pattern | The keyword matched against the names of the objects (or another search attribute, according to the filter) in the search. |
| 2 | Search | Performs the search. When it finishes, the result is displayed in the grid at the bottom of the widget. |
| 3 | Filter | Shows or hides the search filter options. The filter defines the kinds of objects to be searched and some pattern matching options. |
| 4 | Clear | Clears the results grid so a new search can start. |
| 5 | Select | Selects objects in the canvas by two conditions: |
| 6 | Fade out | Fades out objects in the canvas by two conditions: |
| 7 | Results | The objects found by the search, with their ID, name, type, parent, parent type, and comment. Interact with the items to select or fade out the objects in the canvas. |
The Filter button
opens a menu where the search is configured: the attribute to be searched (Search field), the kinds of objects to be listed, and the options described in the table below.

| Action/Option | Description |
|---|---|
Filtered attribute | The name of the attribute in which the pattern must be matched. Currently, object searching can operate over the following objects' attributes: name, comment, signature, schema, owner, tablespace, data type, return type, source table, destination table, related foreign key, source columns, and referenced columns. |
Regular Expression | This option enables the pattern to be interpreted as a regular expression. |
Exact Match | This option indicates that the search must select only those objects in which the search attribute completely matches the pattern. |
Case Sensitive | This option enables the search to consider the upper or lower case when matching attributes. For instance, let's say we have two objects named object_a and OBJECT_A, if we search them by using the pattern obj* with the case-sensitive option checked, only the first object will be returned because, even though the names look the same to us, they are different for the search process due to the upper case characters in the second object's name. |
Check all | Selects all the object types on the filter. Every time you modify the selection on the object type filter you need to do a new search in order to apply this change. |
Uncheck all | Clears the selection on the object type filter. |
The buttons Select
and Fade out
act over the graphical objects of the model according to the results of the search. Both have two options: Listed, which applies the action to the objects that are in the results grid, and Not listed, which applies it to all the other graphical objects of the model.
-
Select
: selects the graphical objects, so they can be moved, copied, or edited together. -
Fade out
: fades out the graphical objects. The current fade in/out state of all objects is reset before the action, so only the chosen ones end up faded out. See the section about fading objects to know how to bring them back.


References
Qt framework regular expressions API
https://doc.qt.io/qt-6/qregularexpression.html