www.delorie.com/gnu/docs/gnats/gnats_23.html   search  
 
Buy GNU books!


Keeping Track

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.4.4 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 section 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 section Querying using regular expressions, which also contains further useful examples of query expressions.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003