Collaboration diagram for Miscellaneous functions:

Functions

RDM_RETCODE rdm_dbPersistInMemory (RDM_DB db)
Persist in-memory tables to disk. More...
RDM_RETCODE rdm_dbSave (RDM_DB db)
Persist data in the local cache to TFS. More...

Detailed Description

Miscellaneous API. All the functions here are located in RaimaDB DB Engine Library. Linker option:

    -lrdmrdm

Function Documentation

rdm_dbPersistInMemory()

RDM_RETCODE rdm_dbPersistInMemory ( RDM_DB db )

#include <rdmdbapi.h>

Persist in-memory tables to disk.

This function will write data from in-memory tables to the physical file(s) backing the database. The in-memory tables must be "storage=inmemory_persist" or "storage=inmemory_read".

Locking Requirements
Read locks on all tables (RDM_LOCK_ALL).
Return values
sOKAY Normal, successful return.
eDBNOTOPEN Database not open.
eREADONLY Database is read-only and cannot be updated.
eNOSTARTREAD A read operation was attempted when no rdm_dbStartSnapshot(), rdm_dbStartRead(), or rdm_dbStartUpdate() is active.
eNOTLOCKED Attempt to access a table for reading or update without proper locks.
ePRECOMMITTED A precommitted transaction must be committed or rolled back before further operations on this database are allowed.
See also
rdm_dbStartRead
rdm_dbStartSnapshot
rdm_dbStartUpdate
rdm_dbExport
rdm_dbEnd
Parameters
[in] db A valid RaimaDB database handle

rdm_dbSave()

RDM_RETCODE rdm_dbSave ( RDM_DB db )

#include <rdmdbapi.h>

Persist data in the local cache to TFS.

This function will write data stored in the local runtime cache to the physical file(s) in TFS.

Locking Requirements
Write locks on all tables (RDM_LOCK_ALL).
Return values
sOKAY Normal, successful return.
eDBNOTOPEN Database not open.
eREADONLY Database is read-only and cannot be updated.
eNOSTARTUPDATE An update operation was attempted when no rdm_dbStartUpdate() is active.
eNOTLOCKED Attempt to access a table for reading or update without proper locks.
ePRECOMMITTED A precommitted transaction must be committed or rolled back before further operations on this database are allowed.
eINVOPENMODE Invalid database open mode.
eINVSTORAGETYPE Only INMEMORY_LOAD or INMEMORY_PERSIST databases can be persisted.
See also
rdm_dbPersistInMemory
rdm_dbStartUpdate
rdm_dbEnd
rdm_dbClose
Parameters
[in] db A valid RaimaDB database handle