1Email Database
2==============
3
4.. module:: alot.db
5
6The python bindings to libnotmuch define :class:`notmuch.Thread` and
7:class:`notmuch.Message`, which unfortunately are very fragile.
8Alot defines the wrapper classes :class:`alot.db.Thread` and :class:`alot.db.Message` that
9use an :class:`manager.DBManager` instance to transparently provide persistent objects.
10
11:class:`alot.db.Message` moreover contains convenience methods
12to extract information about the message like reformated header values, a summary,
13decoded and interpreted body text and a list of :class:`Attachments <alot.db.attachment.Attachment>`.
14
15The central :class:`~alot.ui.UI` instance carries around a :class:`~manager.DBManager` object that
16is used for any lookups or modifications of the email base. :class:`~manager.DBManager` can
17directly look up :class:`Thread` and :class:`~alot.db.Message` objects and is able to
18postpone/cache/retry writing operations in case the Xapian index is locked by another
19process.
20
21
22Database Manager
23-----------------
24.. autoclass:: alot.db.manager.DBManager
25   :members:
26
27
28Errors
29----------
30
31.. module:: alot.db.errors
32
33.. autoclass:: DatabaseError
34   :members:
35.. autoclass:: DatabaseROError
36   :members:
37.. autoclass:: DatabaseLockedError
38   :members:
39.. autoclass:: NonexistantObjectError
40   :members:
41
42Wrapper
43-------
44.. autoclass:: alot.db.Thread
45   :members:
46
47
48.. autoclass:: alot.db.Message
49   :members:
50
51
52Other Structures
53----------------
54
55.. autoclass:: alot.db.attachment.Attachment
56   :members:
57
58.. autoclass:: alot.db.envelope.Envelope
59   :members:
60
61
62Utilities
63---------
64
65.. automodule:: alot.db.utils
66   :members:
67