<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/database-private.h, branch 0.31.3</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.31.3</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.31.3'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2020-07-28T11:47:58Z</updated>
<entry>
<title>lib: replace use of static_cast for writable databases</title>
<updated>2020-07-28T11:47:58Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2020-07-26T23:31:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a09293793f43b93b7008dd361b192199ad528fca'/>
<id>urn:sha1:a09293793f43b93b7008dd361b192199ad528fca</id>
<content type='text'>
static_cast is a bit tricky to understand and error prone, so add a
second pointer to (potentially the same) Xapian database object that
we know has the right subclass.
</content>
</entry>
<entry>
<title>lib: move deallocation of memory from n_d_close to n_d_destroy</title>
<updated>2020-07-22T22:52:55Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2020-07-14T11:25:28Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=095d3d7134f5668b96cf1d70997d3f110b03c898'/>
<id>urn:sha1:095d3d7134f5668b96cf1d70997d3f110b03c898</id>
<content type='text'>
In order to mimic the "best effort" API of Xapian to provide
information from a closed database when possible, do not
destroy the Xapian database object too early.

Because the pointer to a Xapian database is no longer nulled on close,
introduce a flag to track whether the notmuch database is open or not.
</content>
</entry>
<entry>
<title>lib: migrate from Xapian ValueRangeProcessor to RangeProcessor</title>
<updated>2020-07-11T20:20:09Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2020-07-07T10:56:46Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b90d852a2fb377d5b7db4ab2ac389964f8c0c3b3'/>
<id>urn:sha1:b90d852a2fb377d5b7db4ab2ac389964f8c0c3b3</id>
<content type='text'>
This will be mandatory as of Xapian 1.5.  The API is also more
consistent with the FieldProcessor API, which helps code re-use a bit.

Note that this switches to using the built-in Xapian support for
prefixes on ranges (i.e. deleted code at beginning of
ParseTimeRangeProcessor::operator(), added prefix to constructor).

Another side effect of the migration is that we are generating smaller
queries, using one OP_VALUE_RANGE instead of an AND of two OP_VALUE_*
queries.
</content>
</entry>
<entry>
<title>lib: run uncrustify</title>
<updated>2019-06-14T10:41:27Z</updated>
<author>
<name>uncrustify</name>
<email>david@tethera.net</email>
</author>
<published>2019-06-13T10:55:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2b62ca2e3b786beca8d89fa737bda0b49faa638d'/>
<id>urn:sha1:2b62ca2e3b786beca8d89fa737bda0b49faa638d</id>
<content type='text'>
This is the result of running

     $ uncrustify --replace --config ../devel/uncrustify.cfg *.c *.h *.cc

in the lib directory
</content>
</entry>
<entry>
<title>lib: cache user prefixes in database object</title>
<updated>2019-05-25T10:08:20Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2018-11-17T14:09:00Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b52cda90f0b05ce5055fb840e6d9dd88c09f1f83'/>
<id>urn:sha1:b52cda90f0b05ce5055fb840e6d9dd88c09f1f83</id>
<content type='text'>
This will be used to avoid needing a database access to resolve a db
prefix from the corresponding UI prefix (e.g. when indexing). Arguably
the setup of the separate header map does not belong here, since it is
about indexing rather than querying, but we currently don't have any
other indexing setup to do.
</content>
</entry>
<entry>
<title>lib: add 'body:' field, stop indexing headers twice.</title>
<updated>2019-04-17T11:48:16Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2019-03-19T00:39:21Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=319dd95ebbd841320e269d34e67a824876f8426a'/>
<id>urn:sha1:319dd95ebbd841320e269d34e67a824876f8426a</id>
<content type='text'>
The new `body:` field (in Xapian terms) or prefix (in slightly
sloppier notmuch) terms allows matching terms that occur only in the
body.

Unprefixed query terms should continue to match anywhere (header or
body) in the message.

This follows a suggestion of Olly Betts to use the facility (since
Xapian 1.0.4) to add the same field with multiple prefixes. The double
indexing of previous versions is thus replaced with a query time
expension of unprefixed query terms to the various prefixed
equivalent.

Reindexing will be needed for 'body:' searches to work correctly;
otherwise they will also match messages where the term occur in
headers (demonstrated by the new tests in T530-upgrade.sh)
</content>
</entry>
<entry>
<title>lib: convert notmuch_bool_t to stdbool internally</title>
<updated>2017-10-10T01:27:16Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-10-07T08:44:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=008a5e92eb157e2bb8622cb2fbf644deba5ba4b4'/>
<id>urn:sha1:008a5e92eb157e2bb8622cb2fbf644deba5ba4b4</id>
<content type='text'>
C99 stdbool turned 18 this year. There really is no reason to use our
own, except in the library interface for backward
compatibility. Convert the lib internally to stdbool.
</content>
</entry>
<entry>
<title>lib: isolate n_d_add_message and helper functions into own file</title>
<updated>2017-08-02T01:17:47Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2017-06-04T12:32:24Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4034a7cec75b785c9f935186a4daad7c325df56c'/>
<id>urn:sha1:4034a7cec75b785c9f935186a4daad7c325df56c</id>
<content type='text'>
'database.cc' is becoming a monster, and it's hard to follow what the
various static functions are used for. It turns out that about 1/3 of
this file notmuch_database_add_message and helper functions not used
by any other function. This commit isolates this code into it's own
file.

Some side effects of this refactoring:

- find_doc_ids becomes the non-static (but still private)
  _notmuch_database_find_doc_ids
- a few instances of 'string' have 'std::' prepended, avoiding the
  need for 'using namespace std;' in the new file.
</content>
</entry>
<entry>
<title>build: switch to hiding libnotmuch symbols by default</title>
<updated>2017-05-12T10:17:18Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-05-10T19:42:11Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=bc11759dd1fd198661657b741bc0143c9af309a4'/>
<id>urn:sha1:bc11759dd1fd198661657b741bc0143c9af309a4</id>
<content type='text'>
The dynamic generation of the linker version script for libnotmuch
exports has grown rather complicated.

Reverse the visibility control by hiding symbols by default using
-fvisibility=hidden, and explicitly exporting symbols in notmuch.h
using #pragma GCC visibility. (We could also use __attribute__
((visibility ("default"))) for each exported function, but the pragma
is more convenient.)

The above is not quite enough alone, as it would "leak" a number of
weak symbols from Xapian and C++ standard library. Combine it with a
small static version script that filters out everything except the
notmuch_* symbols that we explicitly exposed, and the C++ RTTI
typeinfo symbols for exception handling.

Finally, as the symbol hiding test can no longer look at the generated
symbol table, switch the test to parse the functions from notmuch.h.
</content>
</entry>
<entry>
<title>lib: create field processors from prefix table</title>
<updated>2017-03-03T11:15:13Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2017-02-27T02:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=31b8ce4558de69860c95bf319a0a162316dce6c6'/>
<id>urn:sha1:31b8ce4558de69860c95bf319a0a162316dce6c6</id>
<content type='text'>
This is a bit more code than hardcoding the two existing field
processors, but it should make it easy to add more.
</content>
</entry>
</feed>
