Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
:param mode: Mode to open a database in. Is always
:attr:`MODE`.READ_WRITE when creating a new one.
:type mode: :attr:`MODE`
:param mode: Mode to open a database in. Is always
:attr:`MODE`.READ_WRITE when creating a new one.
:type mode: :attr:`MODE`
- :exception: :exc:`NotmuchError` or derived exception in case of
+ :raises: :exc:`NotmuchError` or derived exception in case of
failure.
"""
self._db = None
failure.
"""
self._db = None
:param path: A directory in which we should create the database.
:type path: str
:returns: Nothing
:param path: A directory in which we should create the database.
:type path: str
:returns: Nothing
- :exception: :exc:`NotmuchError` in case of any failure
+ :raises: :exc:`NotmuchError` in case of any failure
(possibly after printing an error message on stderr).
"""
if self._db is not None:
(possibly after printing an error message on stderr).
"""
if self._db is not None:
:param status: Open the database in read-only or read-write mode
:type status: :attr:`MODE`
:returns: Nothing
:param status: Open the database in read-only or read-write mode
:type status: :attr:`MODE`
:returns: Nothing
- :exception: Raises :exc:`NotmuchError` in case of any failure
+ :raises: Raises :exc:`NotmuchError` in case of any failure
(possibly after printing an error message on stderr).
"""
res = Database._open(_str(path), mode)
(possibly after printing an error message on stderr).
"""
res = Database._open(_str(path), mode)
neither begin nor end necessarily flush modifications to disk.
:returns: :attr:`STATUS`.SUCCESS or raises
neither begin nor end necessarily flush modifications to disk.
:returns: :attr:`STATUS`.SUCCESS or raises
- :exception: :exc:`NotmuchError`: :attr:`STATUS`.XAPIAN_EXCEPTION
+ :raises: :exc:`NotmuchError`: :attr:`STATUS`.XAPIAN_EXCEPTION
Xapian exception occurred; atomic section not entered.
*Added in notmuch 0.9*"""
Xapian exception occurred; atomic section not entered.
*Added in notmuch 0.9*"""
:returns: :attr:`STATUS`.SUCCESS or raises
:returns: :attr:`STATUS`.SUCCESS or raises
:exc:`NotmuchError`:
:attr:`STATUS`.XAPIAN_EXCEPTION
A Xapian exception occurred; atomic section not
:exc:`NotmuchError`:
:attr:`STATUS`.XAPIAN_EXCEPTION
A Xapian exception occurred; atomic section not
of database (see :meth:`get_path`), or else should be an absolute
path with initial components that match the path of 'database'.
:returns: :class:`Directory` or raises an exception.
of database (see :meth:`get_path`), or else should be an absolute
path with initial components that match the path of 'database'.
:returns: :class:`Directory` or raises an exception.
:exc:`NotmuchError` with :attr:`STATUS`.FILE_ERROR
If path is not relative database or absolute with initial
components same as database.
:exc:`NotmuchError` with :attr:`STATUS`.FILE_ERROR
If path is not relative database or absolute with initial
components same as database.
:rtype: 2-tuple(:class:`Message`, :attr:`STATUS`)
:rtype: 2-tuple(:class:`Message`, :attr:`STATUS`)
- :exception: Raises a :exc:`NotmuchError` with the following meaning.
+ :raises: Raises a :exc:`NotmuchError` with the following meaning.
If such an exception occurs, nothing was added to the database.
:attr:`STATUS`.FILE_ERROR
If such an exception occurs, nothing was added to the database.
:attr:`STATUS`.FILE_ERROR
This filename was removed but the message persists in the
database with at least one other filename.
This filename was removed but the message persists in the
database with at least one other filename.
- :exception: Raises a :exc:`NotmuchError` with the following meaning.
+ :raises: Raises a :exc:`NotmuchError` with the following meaning.
If such an exception occurs, nothing was removed from the
database.
If such an exception occurs, nothing was removed from the
database.
:param msgid: The message ID
:type msgid: unicode or str
:returns: :class:`Message` or `None` if no message is found.
:param msgid: The message ID
:type msgid: unicode or str
:returns: :class:`Message` or `None` if no message is found.
:exc:`OutOfMemoryError`
If an Out-of-memory occured while constructing the message.
:exc:`XapianError`
:exc:`OutOfMemoryError`
If an Out-of-memory occured while constructing the message.
:exc:`XapianError`
function returns None if no message is found with the given
filename.
function returns None if no message is found with the given
filename.
:exc:`OutOfMemoryError`
If an Out-of-memory occured while constructing the message.
:exc:`XapianError`
:exc:`OutOfMemoryError`
If an Out-of-memory occured while constructing the message.
:exc:`XapianError`
:param mtime: A (time_t) timestamp
:returns: Nothing on success, raising an exception on failure.
:param mtime: A (time_t) timestamp
:returns: Nothing on success, raising an exception on failure.
- :exception: :exc:`NotmuchError`:
+ :raises: :exc:`NotmuchError`:
:attr:`STATUS`.XAPIAN_EXCEPTION
A Xapian exception occurred, mtime not stored.
:attr:`STATUS`.XAPIAN_EXCEPTION
A Xapian exception occurred, mtime not stored.
:param mtime: A (time_t) timestamp
:returns: Nothing on success, raising an exception on failure.
:param mtime: A (time_t) timestamp
:returns: Nothing on success, raising an exception on failure.
- :exception: :exc:`NotmuchError`:
+ :raises: :exc:`NotmuchError`:
:attr:`STATUS`.NOT_INITIALIZED
The directory has not been initialized
:attr:`STATUS`.NOT_INITIALIZED
The directory has not been initialized
"""Returns the message ID
:returns: String with a message ID
"""Returns the message ID
:returns: String with a message ID
- :exception: :exc:`NotInitializedError` if the message
+ :raises: :exc:`NotInitializedError` if the message
is not initialized.
"""
if not self._msg:
is not initialized.
"""
if not self._msg:
message belongs to a single thread.
:returns: String with a thread ID
message belongs to a single thread.
:returns: String with a thread ID
- :exception: :exc:`NotInitializedError` if the message
+ :raises: :exc:`NotInitializedError` if the message
is not initialized.
"""
if not self._msg:
is not initialized.
"""
if not self._msg:
an empty Messages iterator.
:returns: :class:`Messages`.
an empty Messages iterator.
:returns: :class:`Messages`.
- :exception: :exc:`NotInitializedError` if the message
+ :raises: :exc:`NotInitializedError` if the message
is not initialized.
"""
if not self._msg:
is not initialized.
"""
if not self._msg:
:returns: A time_t timestamp.
:rtype: c_unit64
:returns: A time_t timestamp.
:rtype: c_unit64
- :exception: :exc:`NotInitializedError` if the message
+ :raises: :exc:`NotInitializedError` if the message
is not initialized.
"""
if not self._msg:
is not initialized.
"""
if not self._msg:
"""Returns the file path of the message file
:returns: Absolute file path & name of the message file
"""Returns the file path of the message file
:returns: Absolute file path & name of the message file
- :exception: :exc:`NotInitializedError` if the message
+ :raises: :exc:`NotInitializedError` if the message
is not initialized.
"""
if not self._msg:
is not initialized.
"""
if not self._msg:
:param flag: One of the :attr:`Message.FLAG` values (currently only
*Message.FLAG.MATCH*
:returns: An unsigned int (0/1), indicating whether the flag is set.
:param flag: One of the :attr:`Message.FLAG` values (currently only
*Message.FLAG.MATCH*
:returns: An unsigned int (0/1), indicating whether the flag is set.
- :exception: :exc:`NotInitializedError` if the message
+ :raises: :exc:`NotInitializedError` if the message
is not initialized.
"""
if not self._msg:
is not initialized.
"""
if not self._msg:
:param value: A bool indicating whether to set or unset the flag.
:returns: Nothing
:param value: A bool indicating whether to set or unset the flag.
:returns: Nothing
- :exception: :exc:`NotInitializedError` if the message
+ :raises: :exc:`NotInitializedError` if the message
is not initialized.
"""
if not self._msg:
is not initialized.
"""
if not self._msg:
:param querystr: The query string
:type querystr: utf-8 encoded str or unicode
:returns: Nothing
:param querystr: The query string
:type querystr: utf-8 encoded str or unicode
:returns: Nothing
:exc:`NullPointerError` if the query creation failed
(e.g. too little memory).
:exc:`NotInitializedError` if the underlying db was not
:exc:`NullPointerError` if the query creation failed
(e.g. too little memory).
:exc:`NotInitializedError` if the underlying db was not
to get the value of this flag.
:returns: :class:`Threads`
to get the value of this flag.
:returns: :class:`Threads`
- :exception: :exc:`NullPointerError` if search_threads failed
+ :raises: :exc:`NullPointerError` if search_threads failed
"""
self._assert_query_is_initialized()
threads_p = Query._search_threads(self._query)
"""
self._assert_query_is_initialized()
threads_p = Query._search_threads(self._query)
:class:`Messages` in the defined sort order
:returns: :class:`Messages`
:class:`Messages` in the defined sort order
:returns: :class:`Messages`
- :exception: :exc:`NullPointerError` if search_messages failed
+ :raises: :exc:`NullPointerError` if search_messages failed
"""
self._assert_query_is_initialized()
msgs_p = Query._search_messages(self._query)
"""
self._assert_query_is_initialized()
msgs_p = Query._search_messages(self._query)
for as long as the thread is valid.
:returns: String with a message ID
for as long as the thread is valid.
:returns: String with a message ID
- :exception: :exc:`NotInitializedError` if the thread
+ :raises: :exc:`NotInitializedError` if the thread
is not initialized.
"""
if not self._thread:
is not initialized.
"""
if not self._thread:
:returns: The number of all messages in the database
belonging to this thread. Contrast with
:meth:`get_matched_messages`.
:returns: The number of all messages in the database
belonging to this thread. Contrast with
:meth:`get_matched_messages`.
- :exception: :exc:`NotInitializedError` if the thread
+ :raises: :exc:`NotInitializedError` if the thread
is not initialized.
"""
if not self._thread:
is not initialized.
"""
if not self._thread:
:returns: The number of all messages belonging to this thread that
matched the :class:`Query`from which this thread was created.
Contrast with :meth:`get_total_messages`.
:returns: The number of all messages belonging to this thread that
matched the :class:`Query`from which this thread was created.
Contrast with :meth:`get_total_messages`.
- :exception: :exc:`NotInitializedError` if the thread
+ :raises: :exc:`NotInitializedError` if the thread
is not initialized.
"""
if not self._thread:
is not initialized.
"""
if not self._thread:
:returns: A time_t timestamp.
:rtype: c_unit64
:returns: A time_t timestamp.
:rtype: c_unit64
- :exception: :exc:`NotInitializedError` if the message
+ :raises: :exc:`NotInitializedError` if the message
is not initialized.
"""
if not self._thread:
is not initialized.
"""
if not self._thread:
:returns: A time_t timestamp.
:rtype: c_unit64
:returns: A time_t timestamp.
:rtype: c_unit64
- :exception: :exc:`NotInitializedError` if the message
+ :raises: :exc:`NotInitializedError` if the message
is not initialized.
"""
if not self._thread:
is not initialized.
"""
if not self._thread: