mu-query: implement mu_query_count_run

To get the number of matches and nothing else.
This commit is contained in:
Dirk-Jan C. Binnema
2020-01-21 20:50:19 +02:00
parent bb932fa217
commit bdec1fe9c4
2 changed files with 47 additions and 2 deletions

View File

@ -75,8 +75,8 @@ typedef enum {
} MuQueryFlags;
/**
* run a Xapian query; for the syntax, please refer to the mu-find
* manpage, or http://xapian.org/docs/queryparser.html
* run a Xapian query; for the syntax, please refer to the mu-query
* manpage
*
* @param self a valid MuQuery instance
* @param expr the search expression; use "" to match all messages
@ -98,6 +98,18 @@ MuMsgIter* mu_query_run (MuQuery *self, const char* expr,
G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
/**
* run a Xapian query to count the number of matches; for the syntax, please
* refer to the mu-query manpage
*
* @param self a valid MuQuery instance
* @param expr the search expression; use "" to match all messages
*
* @return the number of matches
*/
size_t mu_query_count_run (MuQuery *self, const char *searchexpr);
/**
* get Xapian's internal string representation of the query
*