da_notmuch_database_open

Open an existing notmuch database located at 'path'.

The database should have been created at some time in the past, (not necessarily by this process), by calling notmuch_database_create with 'path'. By default the database should be opened for reading only. In order to write to the database you need to pass the NOTMUCH_DATABASE_MODE_READ_WRITE mode.

An existing notmuch database can be identified by the presence of a directory named ".notmuch" below 'path'.

The caller should call notmuch_database_destroy when finished with this database.

In case of any failure, this function returns an error status and sets *database to NULL (after printing an error message on stderr).

Return value:

alias da_notmuch_database_open = notmuch_status_t function()

Detailed Description

NOTMUCH STATUS SUCCESS

Successfully opened the database.

NOTMUCH STATUS NULL POINTER

The given 'path' argument is NULL.

NOTMUCH STATUS OUT OF MEMORY

Out of memory.

NOTMUCH STATUS FILE ERROR

An error occurred trying to open the * database file (such as permission denied, or file not found, * etc.), or the database version is unknown.

NOTMUCH STATUS XAPIAN EXCEPTION

A Xapian exception occurred.

Meta