4.2. Email Database¶
The python bindings to libnotmuch define notmuch.Thread and
notmuch.Message, which unfortunately are very fragile.
Alot defines the wrapper classes alot.db.Thread and alot.db.Message that
use an manager.DBManager instance to transparently provide persistent objects.
alot.db.Message moreover contains convenience methods
to extract information about the message like reformated header values, a summary,
decoded and interpreted body text and a list of Attachments.
The central UI instance carries around a DBManager object that
is used for any lookups or modifications of the email base. DBManager can
directly look up Thread and Message objects and is able to
postpone/cache/retry writing operations in case the Xapian index is locked by another
process.