X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fdatabase.cc;h=f0bfe5667fba4736996583830047d7529cd390fc;hp=33e22d86eae541668b6a896d1ae11fbde732dec0;hb=af8903df34647d9456e8f3fe26a164959969b451;hpb=4dfb69169e6b685670ebdeedab898c31adc995b2 diff --git a/lib/database.cc b/lib/database.cc index 33e22d86..f0bfe566 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -97,6 +97,9 @@ typedef struct { * STRING is the name of a file within that * directory for this mail message. * + * property: Has a property with key=value + * FIXME: if no = is present, should match on any value + * * A mail document also has four values: * * TIMESTAMP: The time_t value corresponding to the message's @@ -251,7 +254,6 @@ static prefix_t BOOLEAN_PREFIX_INTERNAL[] = { { "directory", "XDIRECTORY" }, { "file-direntry", "XFDIRENTRY" }, { "directory-direntry", "XDDIRENTRY" }, - { "property", "XPROPERTY" }, }; static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = { @@ -260,6 +262,7 @@ static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = { { "is", "K" }, { "id", "Q" }, { "path", "P" }, + { "property", "XPROPERTY" }, /* * Unconditionally add ':' to reduce potential ambiguity with * overlapping prefixes and/or terms that start with capital @@ -1140,7 +1143,6 @@ notmuch_database_close (notmuch_database_t *notmuch) return status; } -#if HAVE_XAPIAN_COMPACT static int unlink_cb (const char *path, unused (const struct stat *sb), @@ -1324,17 +1326,6 @@ notmuch_database_compact (const char *path, return ret; } -#else -notmuch_status_t -notmuch_database_compact (unused (const char *path), - unused (const char *backup_path), - unused (notmuch_compact_status_cb_t status_cb), - unused (void *closure)) -{ - _notmuch_database_log (notmuch, "notmuch was compiled against a xapian version lacking compaction support.\n"); - return NOTMUCH_STATUS_UNSUPPORTED_OPERATION; -} -#endif notmuch_status_t notmuch_database_destroy (notmuch_database_t *notmuch) @@ -1682,8 +1673,8 @@ notmuch_database_begin_atomic (notmuch_database_t *notmuch) notmuch->atomic_nesting > 0) goto DONE; - if (notmuch_database_needs_upgrade(notmuch)) - return NOTMUCH_STATUS_UPGRADE_REQUIRED; + if (notmuch_database_needs_upgrade (notmuch)) + return NOTMUCH_STATUS_UPGRADE_REQUIRED; try { (static_cast (notmuch->xapian_db))->begin_transaction (false);