Symisc Vedis

An Embeddable Datastore Engine



Vedis C/C++ API Reference - Datastore Handle.

Syntax

int vedis_close(vedis *pStore);


Closing a Vedis datastore handle.


Description


The vedis_close() routine is the destructor for the vedis handle. Calls to vedis_close() return VEDIS_OK if the vedis object is successfully destroyed and all associated resources are deallocated.


If vedis_close() is invoked while a transaction is open, the transaction is automatically committed unless the VEDIS_CONFIG_DISABLE_AUTO_COMMIT option is set. In which case, the database is rolled back.


Parameters


pStore

Vedis datastore handle.


Return value


VEDIS_OK is returned on success. Any other return value indicates failure such as:


VEDIS_BUSY: Another thread or process have an exclusive lock on the database. In this case, the caller should wait until the lock holder relinquish it.


VEDIS_IOERR: OS specific error.


VEDIS_ABORT: Another thread have released the database handle.


For a human-readable error message, you can extract the database error log via vedis_config() with a configuration verb set to VEDIS_CONFIG_ERR_LOG.


See also


vedis_open, vedis_config.



Symisc Systems
Copyright © Symisc Systems