GHashTable *hash;
unsigned int count;
notmuch_sort_t sort;
+ notmuch_status_t status;
sort = query->sort;
query->sort = NOTMUCH_SORT_UNSORTED;
- messages = notmuch_query_search_messages (query);
+ status = notmuch_query_search_messages_st (query, &messages);
+ if (status)
+ return 0;
+
query->sort = sort;
if (messages == NULL)
return 0;
return count;
}
+
+notmuch_database_t *
+notmuch_query_get_database (notmuch_query_t *query)
+{
+ return query->notmuch;
+}