Node:Example queries, Previous:Query expressions, Up:query-pr



Example queries

The following simple query:

query-pr --expr 'Category~"rats" & State~"analyzed"
                 & Responsible~"fred"'

yields all PRs in the database which contain the field values:

>Category:     rats         and
>Responsible:  fred         and
>State:        analyzed

The following query:

query-pr --expr 'State~"open|analyzed"'

yields all PRs in the database whose State values match either open or analyzed (see Querying using regular expressions. This search is useful as a daily report that lists all Problem Reports which require attention.

The following query:

query-pr --expr 'fieldtype:Text="The quick.*brown fox"'

yields all PRs whose TEXT fields contain the text The quick followed by brown fox within the same field. See Querying using regular expressions, which also contains further useful examples of query expressions.