This seems like a generally useful thing to support, (but the previous
support through an empty string was not convenient for some users,
(such as the command-line client).
*
* http://xapian.org/docs/queryparser.html
*
*
* http://xapian.org/docs/queryparser.html
*
- * As a special case, passing a length-zero string, (that is ""), will
+ * As a special case, passing either a length-zero string, (that is ""),
+ * or a string consisting of a single asterisk (that is "*"), will
* result in a query that returns all messages in the database.
*
* See notmuch_query_set_sort for controlling the order of results.
* result in a query that returns all messages in the database.
*
* See notmuch_query_set_sort for controlling the order of results.
Xapian::QueryParser::FLAG_WILDCARD |
Xapian::QueryParser::FLAG_PURE_NOT);
Xapian::QueryParser::FLAG_WILDCARD |
Xapian::QueryParser::FLAG_PURE_NOT);
- if (strcmp (query_string, "") == 0) {
+ if (strcmp (query_string, "") == 0 ||
+ strcmp (query_string, "*") == 0)
+ {
final_query = mail_query;
} else {
string_query = notmuch->query_parser->
final_query = mail_query;
} else {
string_query = notmuch->query_parser->
Xapian::QueryParser::FLAG_WILDCARD |
Xapian::QueryParser::FLAG_PURE_NOT);
Xapian::QueryParser::FLAG_WILDCARD |
Xapian::QueryParser::FLAG_PURE_NOT);
- if (strcmp (query_string, "") == 0) {
+ if (strcmp (query_string, "") == 0 ||
+ strcmp (query_string, "*") == 0)
+ {
final_query = mail_query;
} else {
string_query = notmuch->query_parser->
final_query = mail_query;
} else {
string_query = notmuch->query_parser->