You're browsing the documentation of a version that is still under development, the features described here may change or even be removed.

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 load 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 making it possible to filter results by object type and some other attribute, but it also can highlight objects in different ways to identify 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.

Action/Option Description
Pattern The keyword that will be matched against the object's names (or another searching attribute) when searching.
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.
Search This button performs the search. Once finished, the result is displayed on the grid at the bottom of the widget.
Filter This button toggles the search filter options. The filter involves the kind of objects to be searched as well as some pattern-matching options.
Clear This button simply clears the result grid to start over.
Select Selects the objects by two distinct conditions: Listed and Not listed. The first will cause the objects on the result grid to be selected. The second option causes the objects not listed on the results grid to be selected on the canvas.
Fade out Fades out the objects by two distinct conditions: Listed and Not listed. The first will cause the objects on the result grid to be faded out. The second option causes the objects not listed on the results grid to be faded out on the canvas.
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 despite the names being the same for us, for the searching process they are completely different due to the upper case characters on the second object's name.
Check all Select 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.

Qt framework regular expressions API

https://doc.qt.io/qt-6/qregularexpression.html

Oct 31, 2024 at 09:12