Products Support Documentation Download
rdmdbapi.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * Raima Database Manager
3  *
4  * Copyright (c) 2014 Raima Inc., All rights reserved.
5  *
6  * Use of this software, whether in source code format, or in executable,
7  * binary object code form, is governed by the Raima LICENSE which
8  * is fully described in the LICENSE.TXT file, included within this
9  * distribution of files.
10  * ----------------------------------------------------------------------------
11  */
12 
13 /* PLEASE READ AND UNDERSTAND PRIOR TO MODIFYING THIS FILE
14  *
15  * This header file should contain the declarations for functions that are
16  * exported from the RDM runtime libarary as part of the published
17  * RDM_DB interface. These functions will be availabe for use by customers
18  * and other RDM modules, therefore they should all be declared with RDM_EXPORT
19  * and EXTERNAL_FCN.
20  *
21  * If the API takes a string as a parameter it should always use RDM_TCHAR_T
22  * and use a RDM_T_FUNC wrapper.
23  *
24  * This header file should only contain function definitions. Types,
25  * structures, enums etc. required for the RDM_DB interface (a parameter to one
26  * of the public APIs), should be declared in include/rdmtypes.h
27  *
28  */
29 
34 #include "rdmtypes.h"
35 #include "rdmrowidtypes.h"
36 #include "rdmtfstypes.h"
37 
38 #if defined(__cplusplus)
39 extern "C" {
40 #endif
41 
142 #if defined(RDM_UNICODE)
143 #define rdm_dbAlterCatalog RDM_T_FUNC (rdm_dbAlterCatalog)
144 #define rdm_dbEncrypt RDM_T_FUNC (rdm_dbEncrypt)
145 #define rdm_dbExport RDM_T_FUNC (rdm_dbExport)
146 #define rdm_dbGetOption RDM_T_FUNC (rdm_dbGetOption)
147 #define rdm_dbGetOptions RDM_T_FUNC (rdm_dbGetOptions)
148 #define rdm_dbGetInfo RDM_T_FUNC (rdm_dbGetInfo)
149 #define rdm_dbImport RDM_T_FUNC (rdm_dbImport)
150 #define rdm_dbOpen RDM_T_FUNC (rdm_dbOpen)
151 #define rdm_dbSetCatalog RDM_T_FUNC (rdm_dbSetCatalog)
152 #define rdm_dbSetCatalogFromFile RDM_T_FUNC (rdm_dbSetCatalogFromFile)
153 #define rdm_dbCompileCatalog RDM_T_FUNC (rdm_dbCompileCatalog)
154 #define rdm_dbCompileCatalogFromFile RDM_T_FUNC (rdm_dbCompileCatalogFromFile)
155 #define rdm_dbLoadCatalog RDM_T_FUNC (rdm_dbLoadCatalog)
156 #define rdm_dbLoadCatalogFromFile RDM_T_FUNC (rdm_dbLoadCatalogFromFile)
157 #define rdm_dbSetErrorHandler RDM_T_FUNC (rdm_dbSetErrorHandler)
158 #define rdm_dbSetOption RDM_T_FUNC (rdm_dbSetOption)
159 #define rdm_dbSetOptions RDM_T_FUNC (rdm_dbSetOptions)
160 #define rdm_dbVacuum RDM_T_FUNC (rdm_dbVacuum)
161 #endif
162 
190 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbAllocCursor (
191  RDM_DB db,
192  RDM_CURSOR *pCursor
193 );
194 
235 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbAlterCatalog (
236  RDM_DB db,
237  const RDM_TCHAR_T *ddlStmt
238 );
239 
240 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbClearCache (
241  RDM_DB db
242 );
243 
265 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbClose (
266  RDM_DB db
267 );
268 
301 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbDeleteAllRowsFromDatabase (
302  RDM_DB db
303 );
304 
343 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbDeleteAllRowsFromTable (
344  RDM_DB db,
346  tableId
347 );
348 
371 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetMemoryUsage (
372  RDM_DB db,
373  uint64_t *
374  systemCurr,
376  uint64_t *systemMax,
378  uint64_t *userCurr,
379  uint64_t *userMax
380 );
381 
413 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbEncrypt (
414  RDM_DB db,
415  RDM_ENCRYPT enc,
416  const RDM_TCHAR_T *optString
418 );
419 
450 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbEnd (
451  RDM_DB db
452 );
453 
486 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbEndRollback (
487  RDM_DB db
488 );
489 
533 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbExport (
534  RDM_DB db,
535  const RDM_TCHAR_T *optString
537 );
538 
558 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbVacuum (
559  RDM_DB db,
560  const RDM_TCHAR_T *optString
562 );
563 
585 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbFlushIdIndex (
586  RDM_DB db
587 );
588 
609 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbRebuildIdIndex (
610  RDM_DB db
611 );
612 
635 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbCreateNewPackFile (
636  RDM_DB db
637 );
638 
659 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbFree (
660  RDM_DB db
661 );
662 
681 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetEncrypt (
682  RDM_DB db,
683  RDM_ENCRYPT *enc
684 );
685 
723 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetLockStatus (
724  RDM_DB db,
725  RDM_TABLE_ID tableId,
726  RDM_LOCK_STATUS *status
728 );
729 
752 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetOption (
753  RDM_DB db,
754  const RDM_TCHAR_T *keyword,
755  RDM_TCHAR_T *optValue,
756  size_t bytesIn,
757  size_t *bytesOut
758 );
759 
782 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetOptions (
783  RDM_DB db,
784  RDM_TCHAR_T *optString,
785  size_t bytesIn,
786  size_t *bytesOut
787 );
788 
807 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetInfo (
808  RDM_DB db,
809  const RDM_TCHAR_T *keyword,
810  RDM_TCHAR_T *infoString,
811  size_t bytesIn,
812  size_t *bytesOut
813 );
814 
853 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetRows (
854  RDM_DB db,
855  RDM_TABLE_ID tableId,
856  RDM_CURSOR *pCursor
858 );
859 
912 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetRowsAtRowId (
913  RDM_DB db,
914  RDM_TABLE_ID tableId,
915  RDM_ROWID_T rowId,
916  RDM_CURSOR *pCursor
918 );
919 
964 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetRowsByKey (
965  RDM_DB db,
966  RDM_KEY_ID keyId,
967  RDM_CURSOR *pCursor
969 );
970 
1035 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetRowsByKeyAtKey (
1036  RDM_DB db,
1037  RDM_KEY_ID keyId,
1038  const void *keyValue,
1039  size_t len,
1040  RDM_CURSOR *pCursor
1042 );
1043 
1108 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetRowsByKeyAtSearchKey (
1109  RDM_DB db,
1110  RDM_KEY_ID keyId,
1111  const RDM_SEARCH_KEY *keyValue,
1112  RDM_CURSOR *pCursor
1114 );
1115 
1185 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetRowsByKeyInKeyRange (
1186  RDM_DB db,
1187  RDM_KEY_ID keyId,
1188  const void *startValue,
1189  size_t bytesInStartValue,
1190  const void *endValue,
1191  size_t bytesInEndValue,
1192  RDM_CURSOR *pCursor
1194 );
1195 
1259 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetRowsByKeyInRangeKeyRange (
1260  RDM_DB db,
1261  RDM_KEY_ID keyId,
1262  const RDM_RANGE_KEY *startValue,
1263  const RDM_RANGE_KEY *endValue,
1264  RDM_CURSOR *pCursor
1266 );
1267 
1312 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetRowsByKeyInRtreeKeyRange (
1313  RDM_DB db,
1314  RDM_KEY_ID keyId,
1315  const RDM_RTREE_KEY *keyValue,
1316  RDM_CURSOR *pCursor
1318 );
1319 
1385 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetRowsByKeyInSearchKeyRange (
1386  RDM_DB db,
1387  RDM_KEY_ID keyId,
1388  const RDM_SEARCH_KEY *startValue,
1389  const RDM_SEARCH_KEY *endValue,
1390  RDM_CURSOR *pCursor
1392 );
1393 
1410 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetTFS (
1411  RDM_DB db,
1412  RDM_TFS *pTFS );
1413 
1430 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetTFSType (
1431  RDM_DB db,
1432  TFS_TYPE *pTfsType
1433 );
1434 
1470 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbGetTransactionStatus (
1471  RDM_DB db,
1472  RDM_TRANS_STATUS *status
1474 );
1475 
1509 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbImport (
1510  RDM_DB db,
1511  const RDM_TCHAR_T *optString
1513 );
1514 
1565 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbInsertRow (
1566  RDM_DB db,
1567  RDM_TABLE_ID tableId,
1569  const void *colValues,
1575  size_t bytesIn,
1577  RDM_CURSOR *pCursor
1579 );
1580 
1629 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbInsertRows (
1630  RDM_DB db,
1631  RDM_TABLE_ID tableId,
1633  const void *colValues,
1639  size_t bytesIn,
1640  uint32_t num,
1642  RDM_CURSOR *pCursorStatus,
1647  RDM_CURSOR *pCursor
1651 );
1652 
1714 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbOpen (
1715  RDM_DB db,
1716  const RDM_TCHAR_T *dbNameSpec,
1717  RDM_OPEN_MODE mode
1718 );
1719 
1744 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbPersistInMemory (
1745  RDM_DB db
1746 );
1747 
1774 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbPrecommit (
1775  RDM_DB db
1776 );
1777 
1804 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbRebuildKey (
1805  RDM_DB db,
1806  RDM_KEY_ID keyId,
1807  uint32_t reportFrequency,
1809  *fcn
1810 );
1811 
1838 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbRebuildKeys (
1839  RDM_DB db,
1840  uint32_t numKeys,
1841  const RDM_KEY_ID *keyId,
1842  uint32_t reportFrequency,
1844  *fcn
1845 );
1846 
1899 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbReinsertRow (
1900  RDM_DB db,
1901  RDM_TABLE_ID tableId,
1902  RDM_ROWID_T rowId,
1903  const void *colValues,
1909  size_t bytesIn,
1911  RDM_CURSOR *pCursor
1913 );
1914 
1946 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbSetCatalog (
1947  RDM_DB db,
1948  const RDM_TCHAR_T
1949  *catalog
1950 );
1951 
1988 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbSetCatalogFromFile (
1989  RDM_DB db,
1990  const RDM_TCHAR_T *catfile
1991 );
1992 
2023 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbCompileCatalog (
2024  RDM_DB db,
2025  const RDM_TCHAR_T
2026  *schema
2027 );
2028 
2068 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbCompileCatalogFromFile (
2069  RDM_DB db,
2070  const RDM_TCHAR_T *schemafile
2071 );
2072 
2105 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbLoadCatalog (
2106  RDM_DB db,
2107  const RDM_TCHAR_T
2108  *catalog
2109 );
2110 
2149 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbLoadCatalogFromFile (
2150  RDM_DB db,
2151  const RDM_TCHAR_T *catfile
2152 );
2153 
2179 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbSetEncrypt (
2180  RDM_DB db,
2181  RDM_ENCRYPT enc
2183 );
2184 
2219 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbSetErrorHandler (
2220  RDM_DB db,
2221  RDM_ERROR_FCN errorFunction,
2223  void *userData
2225 );
2226 
2251 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbSetOption (
2252  RDM_DB db,
2253  const RDM_TCHAR_T *keyword,
2254  const RDM_TCHAR_T *strValue
2255 );
2256 
2295 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbSetOptions (
2296  RDM_DB db,
2297  const RDM_TCHAR_T *optString
2298 );
2299 
2366 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbStartRead (
2367  RDM_DB db,
2368  const RDM_TABLE_ID *tableIds,
2369  uint32_t numTableIds,
2370  RDM_TRANS *pTrans
2371 );
2372 
2409 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbStartSnapshot (
2410  RDM_DB db,
2411  const RDM_TABLE_ID *tableIds,
2412  uint32_t numTableIds,
2413  RDM_TRANS *pTrans
2414 );
2415 
2511 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbStartUpdate (
2512  RDM_DB db,
2513  const RDM_TABLE_ID *writeTableIds,
2514  uint32_t numWriteTableIds,
2515  const RDM_TABLE_ID *readTableIds,
2516  uint32_t numReadTableIds,
2517  RDM_TRANS *pTrans
2518 );
2519 
2538 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbTriggersOff (
2539  RDM_DB db
2540 );
2541 
2564 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbTriggersOn (
2565  RDM_DB db
2566 );
2567 
2593 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbTriggersStatus (
2594  RDM_DB db,
2596  *pStat
2597 );
2598 
2599 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbRepair (
2600  RDM_DB db,
2601  const RDM_TCHAR_T *optString
2603 );
2604 
2621 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbReplicationSend (
2622  RDM_DB db,
2623  void *replicationBuffer,
2624  size_t bufferSize,
2625  size_t *pBytesWritten
2626 );
2627 
2644 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_dbReplicationReceive (
2645  RDM_DB db,
2646  const void *replicationBuffer,
2647  size_t messageSize
2648 );
2649 
2650 #if defined(__cplusplus)
2651 }
2652 #endif
RDM_RETCODE rdm_dbGetOptions(RDM_DB db, RDM_TCHAR_T *optString, size_t bytesIn, size_t *bytesOut)
Get RDM database specific options.
void(* RDM_ERROR_FCN)(RDM_DB, RDM_RETCODE, const RDM_TCHAR_T *, void *)
Definition: rdmtypes.h:295
RDM_RETCODE rdm_dbInsertRows(RDM_DB db, RDM_TABLE_ID tableId, const void *colValues, size_t bytesIn, uint32_t num, RDM_CURSOR *pCursorStatus, RDM_CURSOR *pCursor)
Insert rows into a table.
RDM_RETCODE() RDM_REBUILD_INDEX_REPORT_FCN(const char *table, const char *indexes, uint64_t current, uint64_t total)
Callback function signature to report status on an ID-index rebuild.
Definition: rdmtypes.h:164
struct RDM_TRANS_S * RDM_TRANS
Definition: rdmtypes.h:292
RDM_LOCK_STATUS
Enumeration for RDM table lock status.
Definition: rdmtypes.h:140
RDM_RETCODE rdm_dbStartUpdate(RDM_DB db, const RDM_TABLE_ID *writeTableIds, uint32_t numWriteTableIds, const RDM_TABLE_ID *readTableIds, uint32_t numReadTableIds, RDM_TRANS *pTrans)
Get write locks.
struct RDM_CURSOR_S * RDM_CURSOR
Definition: rdmtypes.h:291
RDM_RETCODE rdm_dbSetErrorHandler(RDM_DB db, RDM_ERROR_FCN errorFunction, void *userData)
Replace default error reporting with a custom function.
RDM_RETCODE rdm_dbGetTFS(RDM_DB db, RDM_TFS *pTFS)
Get the RDM_TFS handle associated with a db.
Header for the native RDM Runtime types.
RDM_RETCODE rdm_dbReplicationSend(RDM_DB db, void *replicationBuffer, size_t bufferSize, size_t *pBytesWritten)
Populate a buffer with all of the changes to an in-memory database.
RDM_RETCODE rdm_dbStartSnapshot(RDM_DB db, const RDM_TABLE_ID *tableIds, uint32_t numTableIds, RDM_TRANS *pTrans)
Start a snapshot.
The RDM Partial Key data structure.
Definition: rdmtypes.h:58
RDM_RETCODE rdm_dbRebuildKeys(RDM_DB db, uint32_t numKeys, const RDM_KEY_ID *keyId, uint32_t reportFrequency, RDM_REBUILD_INDEX_REPORT_FCN *fcn)
Rebuild keys for one or more indexes.
RDM_RETCODE rdm_dbImport(RDM_DB db, const RDM_TCHAR_T *optString)
Database import API.
RDM_RETCODE rdm_dbTriggersOn(RDM_DB db)
Enable use of triggers for an open database.
RDM_RETCODE rdm_dbReplicationReceive(RDM_DB db, const void *replicationBuffer, size_t messageSize)
Apply a replication buffer with changes to an in-memory database.
RDM_RETCODE rdm_dbRebuildIdIndex(RDM_DB db)
Rebuild the database ID Index.
RDM_RETCODE rdm_dbDeleteAllRowsFromTable(RDM_DB db, RDM_TABLE_ID tableId)
Remove all rows from a table.
RDM_RETCODE rdm_dbEnd(RDM_DB db)
End a transactional operation.
RDM_RETCODE rdm_dbClose(RDM_DB db)
Close the database associated with a database handle.
RDM_RETCODE rdm_dbGetRows(RDM_DB db, RDM_TABLE_ID tableId, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with rows based on a table id.
The RDM Range Key data structure.
Definition: rdmtypes.h:103
RDM_RETCODE rdm_dbGetRowsByKey(RDM_DB db, RDM_KEY_ID keyId, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with a row set based on a key.
RDM_RETCODE rdm_dbGetLockStatus(RDM_DB db, RDM_TABLE_ID tableId, RDM_LOCK_STATUS *status)
Get the RDM_DB handle's current lock status of a table.
RDM_RETCODE rdm_dbVacuum(RDM_DB db, const RDM_TCHAR_T *optString)
Database vacuum API.
uint32_t RDM_TABLE_ID
Definition: rdmtypes.h:27
struct RDM_TFS_S * RDM_TFS
RDM TFS Handle.
Definition: rdmtfstypes.h:21
RDM_RETCODE rdm_dbTriggersStatus(RDM_DB db, RDM_TRIGGERS_STATUS *pStat)
Check the triggers use status for a database.
RDM_RETCODE rdm_dbSetCatalogFromFile(RDM_DB db, const RDM_TCHAR_T *catfile)
Associate a catalog with an allocated database.
RDM_RETCODE rdm_dbPrecommit(RDM_DB db)
Precommit a transactional operation (Two-Phase Commit phase 1)
RDM_RETCODE rdm_dbSetCatalog(RDM_DB db, const RDM_TCHAR_T *catalog)
Associate a catalog with an allocated database.
RDM_RETCODE rdm_dbGetOption(RDM_DB db, const RDM_TCHAR_T *keyword, RDM_TCHAR_T *optValue, size_t bytesIn, size_t *bytesOut)
Get a single database option into a string.
RDM_TRANS_STATUS
The RDM transaction status identifiers.
Definition: rdmtypes.h:119
RDM_RETCODE rdm_dbSetEncrypt(RDM_DB db, RDM_ENCRYPT enc)
Associate an encryption context with a database handle.
RDM_RETCODE rdm_dbLoadCatalogFromFile(RDM_DB db, const RDM_TCHAR_T *catfile)
Associate a catalog with an allocated database.
RDM_RETCODE rdm_dbAllocCursor(RDM_DB db, RDM_CURSOR *pCursor)
Allocate a cursor.
RDM_RETCODE rdm_dbSetOptions(RDM_DB db, const RDM_TCHAR_T *optString)
Set RDM options.
RDM_RETCODE rdm_dbGetRowsByKeyInRtreeKeyRange(RDM_DB db, RDM_KEY_ID keyId, const RDM_RTREE_KEY *keyValue, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with a row set based on a r-tree.
RDM_RETCODE rdm_dbFlushIdIndex(RDM_DB db)
Flush the database ID Index.
RDM_RETCODE rdm_dbRepair(RDM_DB db, const RDM_TCHAR_T *optString)
RDM_RETCODE
RDM status and error return codes.
RDM_RETCODE rdm_dbTriggersOff(RDM_DB db)
Disable use of triggers for an open database.
RDM_RETCODE rdm_dbStartRead(RDM_DB db, const RDM_TABLE_ID *tableIds, uint32_t numTableIds, RDM_TRANS *pTrans)
Get read locks.
RDM_RETCODE rdm_dbGetInfo(RDM_DB db, const RDM_TCHAR_T *keyword, RDM_TCHAR_T *infoString, size_t bytesIn, size_t *bytesOut)
Get RDM database information.
RDM_OPEN_MODE
Enumeration for open modes.
Definition: rdmtypes.h:233
RDM_RETCODE rdm_dbFree(RDM_DB db)
Free a database handle.
RDM_RETCODE rdm_dbCompileCatalog(RDM_DB db, const RDM_TCHAR_T *schema)
Associate a schema with an allocated database.
RDM_RETCODE rdm_dbGetRowsByKeyAtKey(RDM_DB db, RDM_KEY_ID keyId, const void *keyValue, size_t len, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with a row set that is ordered by key value and is initially positioned at th...
RDM_TRIGGERS_STATUS
Triggers status values.
Definition: rdmtypes.h:302
RDM_RETCODE rdm_dbReinsertRow(RDM_DB db, RDM_TABLE_ID tableId, RDM_ROWID_T rowId, const void *colValues, size_t bytesIn, RDM_CURSOR *pCursor)
Insert a new row into a table.
The RDM R-tree Key data structure.
Definition: rdmtypes.h:87
RDM_RETCODE rdm_dbGetTFSType(RDM_DB db, TFS_TYPE *pTfsType)
Get the type of the RDM_TFS handle associated with a database.
RDM_RETCODE rdm_dbCompileCatalogFromFile(RDM_DB db, const RDM_TCHAR_T *schemafile)
Associate a catalog with an allocated database.
RDM_RETCODE rdm_dbCreateNewPackFile(RDM_DB db)
Create a new pack file.
uint32_t RDM_KEY_ID
Definition: rdmtypes.h:29
RDM_RETCODE rdm_dbEndRollback(RDM_DB db)
End and rollback a transactional operation.
RDM_RETCODE rdm_dbGetRowsAtRowId(RDM_DB db, RDM_TABLE_ID tableId, RDM_ROWID_T rowId, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with rows based on a tableId and and rowId.
RDM_RETCODE rdm_dbGetMemoryUsage(RDM_DB db, uint64_t *systemCurr, uint64_t *systemMax, uint64_t *userCurr, uint64_t *userMax)
Get memory usage information for a database.
RDM_RETCODE rdm_dbRebuildKey(RDM_DB db, RDM_KEY_ID keyId, uint32_t reportFrequency, RDM_REBUILD_INDEX_REPORT_FCN *fcn)
Rebuild keys for an index.
RDM_RETCODE rdm_dbPersistInMemory(RDM_DB db)
Persist in-memory tables to disk.
RDM_RETCODE rdm_dbLoadCatalog(RDM_DB db, const RDM_TCHAR_T *catalog)
Associate a catalog with an allocated database.
struct RDM_DB_S * RDM_DB
Definition: rdmtypes.h:290
TFS_TYPE
Definition: rdmtfstypes.h:24
RDM_RETCODE rdm_dbGetRowsByKeyInRangeKeyRange(RDM_DB db, RDM_KEY_ID keyId, const RDM_RANGE_KEY *startValue, const RDM_RANGE_KEY *endValue, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with rows in a specified key range.
RDM_RETCODE rdm_dbDeleteAllRowsFromDatabase(RDM_DB db)
Remove all rows from a database.
RDM_RETCODE rdm_dbClearCache(RDM_DB db)
Header for the Transactional File Server (TFS) types.
uint64_t RDM_ROWID_T
Definition: rdmrowidtypes.h:21
RDM_RETCODE rdm_dbExport(RDM_DB db, const RDM_TCHAR_T *optString)
Database export API.
#define RDM_TCHAR_T
Definition: psptypes.h:130
RDM_RETCODE rdm_dbAlterCatalog(RDM_DB db, const RDM_TCHAR_T *ddlStmt)
Process a schema DDL command.
Header for row ID types.
struct RDM_ENCRYPT_S * RDM_ENCRYPT
Definition: psptypes.h:73
RDM_RETCODE rdm_dbGetRowsByKeyInKeyRange(RDM_DB db, RDM_KEY_ID keyId, const void *startValue, size_t bytesInStartValue, const void *endValue, size_t bytesInEndValue, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with rows in a specified key range.
RDM_RETCODE rdm_dbGetRowsByKeyAtSearchKey(RDM_DB db, RDM_KEY_ID keyId, const RDM_SEARCH_KEY *keyValue, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with a row set that is ordered by key value and is initially positioned at th...
RDM_RETCODE rdm_dbGetEncrypt(RDM_DB db, RDM_ENCRYPT *enc)
Get the encryption context associated with a database handle.
RDM_RETCODE rdm_dbEncrypt(RDM_DB db, RDM_ENCRYPT enc, const RDM_TCHAR_T *optString)
Encrypt a database.
RDM_RETCODE rdm_dbSetOption(RDM_DB db, const RDM_TCHAR_T *keyword, const RDM_TCHAR_T *strValue)
Set a single RDM option from a string.
RDM_RETCODE rdm_dbGetRowsByKeyInSearchKeyRange(RDM_DB db, RDM_KEY_ID keyId, const RDM_SEARCH_KEY *startValue, const RDM_SEARCH_KEY *endValue, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with rows in a specified key range.
RDM_RETCODE rdm_dbInsertRow(RDM_DB db, RDM_TABLE_ID tableId, const void *colValues, size_t bytesIn, RDM_CURSOR *pCursor)
Insert a new row into a table at the specified rowId.
RDM_RETCODE rdm_dbOpen(RDM_DB db, const RDM_TCHAR_T *dbNameSpec, RDM_OPEN_MODE mode)
Open an existing RDM database using the specified database handle.
RDM_RETCODE rdm_dbGetTransactionStatus(RDM_DB db, RDM_TRANS_STATUS *status)
Get the transaction status for a database handle.