62 #ifndef _CL_DBAL_API_H_
63 #define _CL_DBAL_API_H_
91 typedef struct ClDbalBerkeleyConfigurationT {
96 ClUint8T* engineEnvironmentPath;
98 }ClDbalBerkeleyConfigurationT;
100 typedef struct ClDbalSQLiteConfiguration {
103 ClUint8T* enginePath;
104 } ClDbalSQLiteConfigurationT;
106 typedef struct ClDbalConfigurationT {
107 ClUint32T engineType;
109 ClDbalBerkeleyConfigurationT berkeleyConfig;
110 ClDbalSQLiteConfigurationT sqliteConfig;
112 }ClDbalConfigurationT;
133 #define CL_DB_CREAT 0X1
139 #define CL_DB_OPEN 0x2
145 #define CL_DB_APPEND 0x4
156 #define CL_DB_SYNC 0x8
158 #define CL_DB_MAX_FLAG 0x10
272 CL_IN ClUint32T maxKeySize,
273 CL_IN ClUint32T maxRecordSize,
404 CL_IN ClUint32T keySize,
406 CL_IN ClUint32T recSize);
444 CL_IN ClUint32T keySize,
446 CL_IN ClUint32T recSize);
487 CL_IN ClUint32T keySize,
489 CL_OUT ClUint32T* pRecSize);
523 CL_IN ClUint32T keySize);
571 CL_OUT ClUint32T* pKeySize,
573 CL_OUT ClUint32T* pRecSize);
621 CL_IN ClUint32T currentKeySize,
623 CL_OUT ClUint32T* pNextKeySize,
625 CL_OUT ClUint32T* pNextRecSize);
695 CL_IN ClUint32T maxKeySize,
696 CL_IN ClUint32T maxRecordSize,
Header file of Error Codes returned by the DBAL Library.
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
#define CL_OUT
CL_OUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:110
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
ClUint8T ClDBFlagT
Definition of database open flag type.
Definition: clDbalApi.h:127
ClRcT clDbalNextRecordGet(CL_IN ClDBHandleT dbHandle, CL_IN ClDBKeyHandleT currentKey, CL_IN ClUint32T currentKeySize, CL_OUT ClDBKeyHandleT *pDBNextKey, CL_OUT ClUint32T *pNextKeySize, CL_OUT ClDBRecordHandleT *pDBNextRec, CL_OUT ClUint32T *pNextRecSize)
Returns the next key and associated record from a database instance.
ClPtrT ClDBHandleT
Database Handle.
Definition: clDbalApi.h:174
ClDBType
Definition of Database type.
Definition: clDbalApi.h:77
ClRcT clDbalTransactionBegin(CL_IN ClDBHandleT dbHandle)
Begins the transaction on a database instance.
ClRcT clDbalRecordDelete(CL_IN ClDBHandleT dbHandle, CL_IN ClDBKeyHandleT dbKey, CL_IN ClUint32T keySize)
Deletes a record from a database instance.
ClRcT clDbalClose(CL_IN ClDBHandleT dbHandle)
Closes a database instance.
const char * ClDBNameT
Type of the name of database.
Definition: clDbalApi.h:163
ClRcT clDbalOpen(CL_IN ClDBFileT dbFile, CL_IN ClDBNameT dbName, CL_IN ClDBFlagT dbFlag, CL_IN ClUint32T maxKeySize, CL_IN ClUint32T maxRecordSize, CL_OUT ClDBHandleT *pDBHandle)
Opens a database instance.
ClRcT clDbalTxnOpen(CL_IN ClDBFileT dbFile, CL_IN ClDBNameT dbName, CL_IN ClDBFlagT dbFlag, CL_IN ClUint32T maxKeySize, CL_IN ClUint32T maxRecordSize, CL_OUT ClDBHandleT *pDBHandle)
Transaction Related APIs.
ClRcT clDbalKeyFree(CL_IN ClDBHandleT dbHandle, CL_IN ClDBKeyHandleT dbKey)
Frees the database key.
enum ClDBType ClDBTypeT
Definition of Database type.
ClDBKeyHandleT ClDBKeyT
Deprecated DB Key Handle type.
Definition: clDbalApi.h:198
ClRcT clDbalSync(CL_IN ClDBHandleT dbHandle, ClUint32T flags)
Flushes (synchronizes) the DB modifications stored in the in-memory cache to disk.
ClRcT clDbalTransactionAbort(CL_IN ClDBHandleT dbHandle)
Aborts a transaction on a database instance.
ClRcT clDbalRecordInsert(CL_IN ClDBHandleT dbHandle, CL_IN ClDBKeyHandleT dbKey, CL_IN ClUint32T keySize, CL_IN ClDBRecordHandleT dbRec, CL_IN ClUint32T recSize)
Record Operation APIs.
ClRcT clDbalRecordFree(CL_IN ClDBHandleT dbHandle, CL_IN ClDBRecordHandleT dbRec)
Frees the database record.
ClUint8T * ClDBKeyHandleT
Type of DB Key Handle (handle to the key of the record which is to be inserted in DB or to be fetched...
Definition: clDbalApi.h:192
ClRcT clDbalFirstRecordGet(CL_IN ClDBHandleT dbHandle, CL_OUT ClDBKeyHandleT *pDBKey, CL_OUT ClUint32T *pKeySize, CL_OUT ClDBRecordHandleT *pDBRec, CL_OUT ClUint32T *pRecSize)
Returns the first key and associated record from a database instance.
ClPtrT ClDBEngineT
Engine Handle.
Definition: clDbalApi.h:117
ClRcT clDbalTransactionCommit(CL_IN ClDBHandleT dbHandle)
Commits the transaction on a database instance.
ClRcT clDbalRecordGet(CL_IN ClDBHandleT dbHandle, CL_IN ClDBKeyHandleT dbKey, CL_IN ClUint32T keySize, CL_OUT ClDBRecordHandleT *pDBRec, CL_OUT ClUint32T *pRecSize)
Retrieves a record from a database instance.
ClRcT clDbalRecordReplace(CL_IN ClDBHandleT dbHandle, CL_IN ClDBKeyHandleT dbKey, CL_IN ClUint32T keySize, CL_IN ClDBRecordHandleT dbRec, CL_IN ClUint32T recSize)
Replaces a record in a database instance.
const char * ClDBFileT
Type of the DB File name.
Definition: clDbalApi.h:168
ClUint8T * ClDBRecordHandleT
Type of DB Record Handle (handle to the record which is to be inserted in DB or to be fetched from th...
Definition: clDbalApi.h:180
ClDBRecordHandleT ClDBRecordT
Deprecated DB Record Handle type.
Definition: clDbalApi.h:186
@ CL_DB_TYPE_BTREE
B-tree.
Definition: clDbalApi.h:85
@ CL_DB_TYPE_HASH
Hash table.
Definition: clDbalApi.h:81