How to build valid search queries

This example describes how valid TQL queries are composed step by step.

Task

Search for all SUBPARTS of the TestCases folder.

Solution

Select the TestCases folder and click on Search in the context menu. The search function now uses the TestCases folder as the starting point for performing the query. Please click on TQL search in the search dialog since the option Simple Search has been selected as default search.

Query to be entered:

->SUBPARTS

Query structure

The following grammar must be used for starting the query:

query ::= {arrowOperator [returnToken] searchExpression}

Since only one level below the starting point should be searched, arrowOperator must be replaced by '->'. The ' ' are not written in this entry.

The returnToken is optional and is thus not required for this search.

SearchExpression is replaced by (assocName | aggregation) [colonToken type] [leftSquareBracket logicalExpression rightSquareBracket].

Now the query looks as follows:

query ::= '->' (assocName | aggregation) [colonToken type] [leftSquareBracket logicalExpression rightSquareBracket]

In case of (assocName | aggregation), we replace aggregation by 'SUBPARTS' since we search for SUBPARTS.

[colonToken type] and [leftSquareBracket logicalExpression rightSquareBracket] are optional and are thus not required.

Now the query looks as follows:

query ::= '->' 'SUBPARTS'

The query is now complete and can be performed.

No space characters are used when entering the query. The ' ' characters are left out.

Entering the query into the search window:

->SUBPARTS

You may have noticed that Tosca Commander™ offers auto completion when you type ->. All valid options that can be used in this case are provided in a drop-down list. You can either choose SUBPARTS from the auto completion list or you can enter them manually.

Auto completion

After you have entered ->SUBPARTS, click on the Search button.

Search result example