<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/database.cc, branch 0.15.1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.15.1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.15.1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2012-11-27T01:12:10Z</updated>
<entry>
<title>lib: Reject multi-message mboxes and deprecate single-message mbox</title>
<updated>2012-11-27T01:12:10Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-11-25T06:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=610f0e09929a5f351f7c1c3850ac7e0d83ffe388'/>
<id>urn:sha1:610f0e09929a5f351f7c1c3850ac7e0d83ffe388</id>
<content type='text'>
Previously, we would treat multi-message mboxes as one giant email,
which, besides the obvious incorrect indexing, often led to
out-of-memory errors for archival mboxes.  Now we explicitly reject
multi-message mboxes.  For historical reasons, we retain support for
single-message mboxes, but official deprecate this behavior.
</content>
</entry>
<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: Make notmuch_database_find_message_by_filename not crash on read-only databases</title>
<updated>2012-05-24T01:31:47Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:40Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=cdd698f96976dc8fc43efd19c452d0fca48e2618'/>
<id>urn:sha1:cdd698f96976dc8fc43efd19c452d0fca48e2618</id>
<content type='text'>
Previously, _notmuch_database_filename_to_direntry would abort with an
internal error when called on a read-only database.  Now that creating
the directory document is optional,
notmuch_database_find_message_by_filename can disable directory
document creation (as it should) and, as a result, not abort on
read-only databases.
</content>
</entry>
<entry>
<title>lib: Make notmuch_database_get_directory return NULL if the directory is not found</title>
<updated>2012-05-24T01:30:55Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=fe1ca1410423d99db09543f4a97bc2ba0c6ade81'/>
<id>urn:sha1:fe1ca1410423d99db09543f4a97bc2ba0c6ade81</id>
<content type='text'>
Using the new support from _notmuch_directory_create, this makes
notmuch_database_get_directory a read-only operation that simply
returns the directory object if it exists or NULL otherwise.  This
also means that notmuch_database_get_directory can work on read-only
databases.

This change breaks the directory mtime workaround in notmuch-new.c by
fixing the exact issue it was working around.  This permits mtime
update races to prevent scans of changed directories, which
non-deterministically breaks a few tests.  The next patch fixes this.
</content>
</entry>
<entry>
<title>lib: Perform the same transformation to _notmuch_database_filename_to_direntry</title>
<updated>2012-05-24T01:30:43Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=67ae2377a9ec2da296a2e012352f962664a4d1a8'/>
<id>urn:sha1:67ae2377a9ec2da296a2e012352f962664a4d1a8</id>
<content type='text'>
Now _notmuch_database_filename_to_direntry takes a flags argument and
can indicate if the necessary directory documents do not exist.
Again, callers have been updated, but retain their original behavior.
</content>
</entry>
<entry>
<title>lib: Perform the same transformation to _notmuch_database_find_directory_id</title>
<updated>2012-05-24T01:30:32Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0c950146a14fa2bb0a0bf542073b2cdca141afd1'/>
<id>urn:sha1:0c950146a14fa2bb0a0bf542073b2cdca141afd1</id>
<content type='text'>
Now _notmuch_database_find_directory_id takes a flags argument, which
it passes through to _notmuch_directory_create and can indicate if the
directory does not exist.  Again, callers have been updated, but
retain their original behavior.
</content>
</entry>
<entry>
<title>lib: Make directory document creation optional for _notmuch_directory_create</title>
<updated>2012-05-24T01:30:20Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f69314fbd37f403a395b7c1c44595c8f696b05b7'/>
<id>urn:sha1:f69314fbd37f403a395b7c1c44595c8f696b05b7</id>
<content type='text'>
Previously this function would create directory documents if they
didn't exist.  As a result, it could only be used on writable
databases.  This adds an argument to make creation optional and to
make this function work on read-only databases.  We use a flag
argument to avoid a bare boolean and to permit future expansion.

Both callers have been updated, but currently retain the old behavior.
We'll take advantage of the new argument in the following patches.
</content>
</entry>
<entry>
<title>lib/cli: Make notmuch_database_get_directory return a status code</title>
<updated>2012-05-15T11:56:33Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-13T23:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7199d22f4394abdf72ab791fc0aba2c697bf1209'/>
<id>urn:sha1:7199d22f4394abdf72ab791fc0aba2c697bf1209</id>
<content type='text'>
Previously, notmuch_database_get_directory had no way to indicate how
it had failed.  This changes its prototype to return a status code and
set an out-argument to the retrieved directory, like similar functions
in the library API.  This does *not* change its currently broken
behavior of creating directory objects when they don't exist, but it
does document it and paves the way for fixing this.  Also, it can now
check for a read-only database and return
NOTMUCH_STATUS_READ_ONLY_DATABASE instead of crashing.

In the interest of atomicity, this also updates calls from the CLI so
that notmuch still compiles.
</content>
</entry>
<entry>
<title>lib/cli: Make notmuch_database_create return a status code</title>
<updated>2012-05-05T13:12:26Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-04-30T16:25:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ba5729421825e0ec9d38aa9d656553f329aa6f09'/>
<id>urn:sha1:ba5729421825e0ec9d38aa9d656553f329aa6f09</id>
<content type='text'>
This is the notmuch_database_create equivalent of the previous change.

In this case, there were places where errors were not being propagated
correctly in notmuch_database_create or in calls to it.  These have
been fixed, using the new status value.
</content>
</entry>
<entry>
<title>lib/cli: Make notmuch_database_open return a status code</title>
<updated>2012-05-05T13:11:57Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-04-30T16:25:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5fddc07dc31481453c1af186bf7da241c00cdbf1'/>
<id>urn:sha1:5fddc07dc31481453c1af186bf7da241c00cdbf1</id>
<content type='text'>
It has been a long-standing issue that notmuch_database_open doesn't
return any indication of why it failed.  This patch changes its
prototype to return a notmuch_status_t and set an out-argument to the
database itself, like other functions that return both a status and an
object.

In the interest of atomicity, this also updates every use in the CLI
so that notmuch still compiles.  Since this patch does not update the
bindings, the Python bindings test fails.
</content>
</entry>
</feed>
