<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/database-private.h, branch 0.18_rc1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.18_rc1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.18_rc1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2012-10-31T19:55:32Z</updated>
<entry>
<title>lib: add date range query support</title>
<updated>2012-10-31T19:55:32Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2012-10-30T20:32:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=90cd1bac4eeb0d57fbe2740625aaa58d8d925ee5'/>
<id>urn:sha1:90cd1bac4eeb0d57fbe2740625aaa58d8d925ee5</id>
<content type='text'>
Add a custom value range processor to enable date and time searches of
the form date:since..until, where "since" and "until" are expressions
understood by the previously added date/time parser, to restrict the
results to messages within a particular time range (based on the Date:
header).

If "since" or "until" describes date/time at an accuracy of days or
less, the values are rounded according to the accuracy, towards past
for "since" and towards future for "until". For example,
date:november..yesterday would match from the beginning of November
until the end of yesterday. Expressions such as date:today..today
means since the beginning of today until the end of today.

Open-ended ranges are supported (since Xapian 1.2.1), i.e. you can
specify date:..until or date:since.. to not limit the start or end
date, respectively.

CAVEATS:

Xapian does not support spaces in range expressions. You can replace
the spaces with '_', or (in most cases) '-', or (in some cases) leave
the spaces out altogether.

Entering date:expr without ".." (for example date:yesterday) will not
work as you might expect. You can achieve the expected result by
duplicating the expr both sides of ".." (for example
date:yesterday..yesterday).

Open-ended ranges won't work with pre-1.2.1 Xapian, but they don't
produce an error either.

Signed-off-by: Jani Nikula &lt;jani@nikula.org&gt;
</content>
</entry>
<entry>
<title>lib: Add support for nested atomic sections.</title>
<updated>2011-09-24T01:50:38Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-06-11T03:35:06Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e59cc0031fbf84f49e32dedb9927f427d2c49309'/>
<id>urn:sha1:e59cc0031fbf84f49e32dedb9927f427d2c49309</id>
<content type='text'>
notmuch_database_t now keeps a nesting count and we only start a
transaction or commit for the outermost atomic section.

Introduces a new error, NOTMUCH_STATUS_UNBALANCED_ATOMIC.
</content>
</entry>
<entry>
<title>Add a generic function to get a list of terms with some prefix.</title>
<updated>2011-03-21T06:45:18Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2010-12-09T05:32:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=206938ec9b4ddee28793f2f052a5314d6d7ab08d'/>
<id>urn:sha1:206938ec9b4ddee28793f2f052a5314d6d7ab08d</id>
<content type='text'>
Replace _notmuch_convert_tags with this and simplify
_create_filenames_for_terms_with_prefix.  This will also come in handy
shortly to get the message file name list.
</content>
</entry>
<entry>
<title>lib: Rework interface for maildir_flags synchronization</title>
<updated>2010-11-11T11:40:19Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-11-11T01:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=bb74e9dff80e64734308d5997c756fd96d041235'/>
<id>urn:sha1:bb74e9dff80e64734308d5997c756fd96d041235</id>
<content type='text'>
Instead of having an API for setting a library-wide flag for
synchronization (notmuch_database_set_maildir_sync) we instead
implement maildir synchronization with two new library functions:

	notmuch_message_maildir_flags_to_tags
  and   notmuch_message_tags_to_maildir_flags

These functions are nicely documented here, (though the implementation
does not quite match the documentation yet---as plainly evidenced by
the current results of the test suite).
</content>
</entry>
<entry>
<title>Make maildir synchronization configurable</title>
<updated>2010-11-10T21:09:32Z</updated>
<author>
<name>Michal Sojka</name>
<email>sojkam1@fel.cvut.cz</email>
</author>
<published>2010-10-31T21:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d9d3d3e6f06a76dc0fbe24c9655b64acfcd4b9e4'/>
<id>urn:sha1:d9d3d3e6f06a76dc0fbe24c9655b64acfcd4b9e4</id>
<content type='text'>
This adds group [maildir] and key 'synchronize_flags' to the
configuration file. Its value enables (true) or diables (false) the
synchronization between notmuch tags and maildir flags. By default,
the synchronization is disabled.
</content>
</entry>
<entry>
<title>lib: Add GCC visibility(hidden) pragmas to private header files.</title>
<updated>2010-11-02T05:35:48Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-11-02T05:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c81cecf620d506653a1ead83858b8b3fc240abb5'/>
<id>urn:sha1:c81cecf620d506653a1ead83858b8b3fc240abb5</id>
<content type='text'>
This prevents any of the private functions from being leaked out
through the library interface (at least when compiling with a
recent-enough gcc to support the visibility pragma).
</content>
</entry>
<entry>
<title>Avoid database corruption by not adding partially-constructed mail documents.</title>
<updated>2010-06-04T17:16:53Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-06-04T17:16:53Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=98845fdbb2a4acaa0036f8e2e998e726b18e6b13'/>
<id>urn:sha1:98845fdbb2a4acaa0036f8e2e998e726b18e6b13</id>
<content type='text'>
Previously we were using Xapian's add_document to allocate document ID
values for notmuch_message_t objects.  This had the drawback of adding
a partially constructed mail document to the database. If notmuch was
subsequently interrupted before fully populating this document, then
later runs would be quite confused when seeing the partial documents.

There are reports from the wild of people hitting internal errors of
the form "Message ... has no thread ID" for example, (which is
currently an unrecoverable error).

We fix this by manually allocating document IDs without adding
documents. With this change, we never call Xapian's add_document
method, but only replace_document with either the current document ID
of a message or a new one that we have allocated.
</content>
</entry>
<entry>
<title>Fix printf for when uint64_t != unsigned long long int</title>
<updated>2010-02-09T19:14:16Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-02-09T19:09:30Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e0a8dee8bcf0785325c07fff5a11e8ec494826db'/>
<id>urn:sha1:e0a8dee8bcf0785325c07fff5a11e8ec494826db</id>
<content type='text'>
Thanks to Michal Sojka &lt;sojkam1@fel.cvut.cz&gt; for pointing out the
correct fix, which I verified in the freely-available WG14/N1124 draft
(from the C99 working group) which is available here:

http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf
</content>
</entry>
<entry>
<title>Switch from random to sequential thread identifiers.</title>
<updated>2010-02-09T19:14:11Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-02-08T19:33:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9439b217c349478b3603d5368f534acb1cd23974'/>
<id>urn:sha1:9439b217c349478b3603d5368f534acb1cd23974</id>
<content type='text'>
The sequential identifiers have the advantage of being guaranteed to
be unique (until we overflow a 64-bit unsigned integer), and also take
up half as much space in the "notmuch search" output (16 columns
rather than 32).

This change also has the side effect of fixing a bug where notmuch
could block on /dev/random at startup (waiting for some entropy to
appear). This bug was hit hard by the test suite, (which could easily
exhaust the available entropy on common systems---resulting in large
delays of the test suite).
</content>
</entry>
<entry>
<title>lib: Implement versioning in the database and provide upgrade function.</title>
<updated>2010-01-08T02:26:31Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-01-08T02:26:31Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=909f52bd8c4bdfa11cd3e75e3d0959e0293689bd'/>
<id>urn:sha1:909f52bd8c4bdfa11cd3e75e3d0959e0293689bd</id>
<content type='text'>
The recent support for renames in the database is our first time
(since notmuch has had more than a single user) that we have a
database format change. To support smooth upgrades we now encode a
database format version number in the Xapian metadata.

Going forward notmuch will emit a warning if used to read from a
database with a newer version than it natively supports, and will
refuse to write to a database with a newer version.

The library also provides functions to query the database format
version:

	notmuch_database_get_version

to ask if notmuch wants a newer version than that:

	notmuch_database_needs_upgrade

and a function to actually perform that upgrade:

	notmuch_database_upgrade
</content>
</entry>
</feed>
