notmuch_database_close

Commit changes and close the given notmuch database.

After notmuch_database_close has been called, calls to other functions on objects derived from this database may either behave as if the database had not been closed (e.g., if the required data has been cached) or may fail with a NOTMUCH_STATUS_XAPIAN_EXCEPTION. The only further operation permitted on the database itself is to call notmuch_database_destroy.

notmuch_database_close can be called multiple times. Later calls have no effect.

For writable databases, notmuch_database_close commits all changes to disk before closing the database. If the caller is currently in an atomic section (there was a notmuch_database_begin_atomic without a matching notmuch_database_end_atomic), this will discard changes made in that atomic section (but still commit changes made prior to entering the atomic section).

Return value:

More...
version(DerelictNotMuch_Static)nothrow
notmuch_database_close

Detailed Description

NOTMUCH STATUS SUCCESS

Successfully closed the database.

NOTMUCH STATUS XAPIAN EXCEPTION

A Xapian exception occurred; the * database has been closed but there are no guarantees the * changes to the database, if any, have been flushed to disk.

Meta