X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fdatabase-private.h;h=7ee8e62d9b56aada2930b6d69e99494717082382;hb=b3bbaf1bc27d79b8191d296998f695be5be3146a;hp=1a73dacc365f563134d123fe09d91668b45a6d1f;hpb=c84ccb70f3ed2b2228346499b5110311039a0ecf;p=notmuch diff --git a/lib/database-private.h b/lib/database-private.h index 1a73dacc..7ee8e62d 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -212,6 +212,11 @@ struct _notmuch_database { char thread_id_str[17]; uint64_t last_thread_id; + /* How many transactions have successfully completed since we last committed */ + int transaction_count; + /* when to commit and reset the counter */ + int transaction_threshold; + /* error reporting; this value persists only until the * next library call. May be NULL */ char *status_string; @@ -227,6 +232,7 @@ struct _notmuch_database { */ unsigned long view; Xapian::QueryParser *query_parser; + Xapian::Stem *stemmer; Xapian::TermGenerator *term_gen; Xapian::RangeProcessor *value_range_processor; Xapian::RangeProcessor *date_range_processor; @@ -295,4 +301,23 @@ _notmuch_database_setup_standard_query_fields (notmuch_database_t *notmuch); notmuch_status_t _notmuch_database_setup_user_query_fields (notmuch_database_t *notmuch); +#if __cplusplus +/* query.cc */ +notmuch_status_t +_notmuch_query_string_to_xapian_query (notmuch_database_t *notmuch, + std::string query_string, + Xapian::Query &output, + std::string &msg); +/* parse-sexp.cc */ +notmuch_status_t +_notmuch_sexp_string_to_xapian_query (notmuch_database_t *notmuch, const char *querystr, + Xapian::Query &output); + +/* regexp-fields.cc */ +notmuch_status_t +_notmuch_regexp_to_query (notmuch_database_t *notmuch, Xapian::valueno slot, std::string field, + std::string regexp_str, + Xapian::Query &output, std::string &msg); +#endif + #endif