[−][src]Type Definition melib::backends::notmuch::bindings::notmuch_query_create
type notmuch_query_create = unsafe extern "C" fn(database: *mut notmuch_database_t, query_string: *const c_char) -> *mut notmuch_query_t;
Create a new query for 'database'.
Here, 'database' should be an open database, (see notmuch_database_open and notmuch_database_create).
For the query string, we'll document the syntax here more completely in the future, but it's likely to be a specialized version of the general Xapian query syntax:
https://xapian.org/docs/queryparser.html
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. See notmuch_query_search_messages and notmuch_query_search_threads to actually execute the query.
User should call notmuch_query_destroy when finished with this query.
Will return NULL if insufficient memory is available.