Vedis C/C++ API Reference - Datastore Handle.
Obtaining a new Vedis datastore handle.
This routine allocate and initialize a new datastore object handle whose name is given by the zStorage argument. A datastore connection is usually returned in *ppStore but, if the engine is unable to allocate memory to hold the vedis object, a NULL will be written into *ppStore instead of a pointer to the vedis object. This routine is often the first API call that an application makes and is a prerequisite in order to play with the library.
If zStorage is ":mem:" or NULL, then a private, in-memory datastore is created for the connection. The in-memory datastore will vanish when the database connection is closed. Future versions of Vedis might make use of additional special filenames that begin with the ":" character. It is recommended that when a database filename actually does begin with a ":" character you should prefix the filename with a pathname such as "./" to avoid ambiguity.
Note: Transactions are not supported for in-memory databases.
Note: This routine does not open the target database file. It merely initialize and prepare the datastore object handle for later usage.
OUT: A fresh datastore connection is written into this pointer.
Relative or full path to the target database file. If zStorage is ":mem:" or NULL then a private, in-memory datastore is created for the connection.
VEDIS_MEM Out of memory (Unlikely scenario).
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.