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

4.3.5 Named query definitions

When queries are performed via query-pr, they can refer to a query format described by a query section in the ‘dbconfig’ file:

 
query "queryname" {
  format "formatstring"
  [fields { "fieldname" [ "fieldname" ... ] } ]
}

formatstring is as described in Formatting query-pr output. It basically contains a string with printf-like % escapes. The output of the query is formatted as specified by this format string.

The fields option lists the fields to be used with the format string. If the fields option is present without a format option, the contents of the listed fields are printed out, separated by newlines.

The named query formats full, standard amd summary must be present in the ‘dbconfig’ file. full and summary correspond to the query-pr options --full and --summary, while standard is used when no format option is given to query-pr.


This document was generated by Chad Walstrom on March 3, 2015 using texi2html 1.82.