X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fdatabase.cc;h=4bfae0197cf9020089640294faad00b64885f468;hb=c2e74662bbbbf9be1fde0ae416dc2664ba3da3cd;hp=57a98c94204f5db2e2714b2568d2424ccb66264c;hpb=293186d6c6b1c4d158413de5412e6b4345e94970;p=notmuch diff --git a/lib/database.cc b/lib/database.cc index 57a98c94..4bfae019 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 @@ -259,11 +262,12 @@ static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = { { "is", "K" }, { "id", "Q" }, { "path", "P" }, + { "property", "XPROPERTY" }, /* - * Without the ":", since this is a multi-letter prefix, Xapian - * will add a colon itself if the first letter of the path is - * upper-case ASCII. Including the ":" forces there to always be a - * colon, which keeps our own logic simpler. + * Unconditionally add ':' to reduce potential ambiguity with + * overlapping prefixes and/or terms that start with capital + * letters. See Xapian document termprefixes.html for related + * discussion. */ { "folder", "XFOLDER:" }, }; @@ -1681,8 +1685,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);