]> git.notmuchmail.org Git - notmuch/commitdiff
lib: add public accessor for database from query
authorDavid Bremner <david@tethera.net>
Sun, 7 Jun 2015 15:01:56 +0000 (17:01 +0200)
committerDavid Bremner <david@tethera.net>
Tue, 4 Aug 2015 07:11:34 +0000 (09:11 +0200)
This is to make it easier for clients of the library to update to the
new error code returning versions of notmuch_query_search_messages

lib/Makefile.local
lib/notmuch.h
lib/query.cc

index b58b4e8a425f8bbf0da01642fc44902268962899..412d8650cf1479700d484a6d86ea54b728e3c1ac 100644 (file)
@@ -11,7 +11,7 @@ LIBNOTMUCH_VERSION_MAJOR = 4
 # the time of release for any additions to the library interface,
 # (and when it is incremented, the release version of the library should
 #  be reset to 0).
-LIBNOTMUCH_VERSION_MINOR = 2
+LIBNOTMUCH_VERSION_MINOR = 3
 
 # The release version the library interface. This should be incremented at
 # the time of release if there have been no changes to the interface, (but
index 7e8e162db59376e2c76993b8cade609562a5bfc1..421c19ddbecd8b4251064b0a6c804b8825c92aa7 100644 (file)
@@ -712,6 +712,12 @@ typedef enum {
 const char *
 notmuch_query_get_query_string (notmuch_query_t *query);
 
+/**
+ * Return the notmuch database of this query. See notmuch_query_create.
+ */
+notmuch_database_t *
+notmuch_query_get_database (notmuch_query_t *query);
+
 /**
  * Exclude values for notmuch_query_set_omit_excluded. The strange
  * order is to maintain backward compatibility: the old FALSE/TRUE
index 9cedb6a8440ae907ac83f9d0b2ac98e8a9f5c9aa..5275b5a24fe620ed2dcef5fd2d87a9b78a1860a6 100644 (file)
@@ -654,3 +654,9 @@ notmuch_query_count_threads (notmuch_query_t *query)
 
     return count;
 }
+
+notmuch_database_t *
+notmuch_query_get_database (notmuch_query_t *query)
+{
+    return query->notmuch;
+}