Functions | |
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. More... | |
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. More... | |
Cursor association API for retrieving rows in rowid order. All the functions here are located in RDM DB Engine Library. Linker option:
-lrdmrdm
See RDM Cursor APIs for a more detailed description of a cursor.
RDM_RETCODE rdm_dbGetRows | ( | RDM_DB | db, |
RDM_TABLE_ID | tableId, | ||
RDM_CURSOR * | pCursor | ||
) |
#include <rdmdbapi.h>
Associate an RDM_CURSOR with rows based on a table id.
This function associates the RDM_CURSOR pointed to by pCursor with a set of rows in rowid order. The cursor will contain all of the rows for the table specified by tableId. The cursor will be initially positioned in the BeforeFirst position.
sOKAY | Normal, successful return. |
eCURSORDB | Cursor is associated with a different database. |
eDBNOTOPEN | Database not open. |
eINVCURSORID | Invalid cursor id. |
ePRECOMMITTED | A precommitted transaction must be committed or rolled back before further operations on this database are allowed. |
[in] | db | A valid RDM database handle |
[in] | tableId | The table id for the row set |
[out] | pCursor | A pointer to an RDM_CURSOR (must be allocated, associated with db, or set to NULL) |
RDM_RETCODE rdm_dbGetRowsAtRowId | ( | RDM_DB | db, |
RDM_TABLE_ID | tableId, | ||
RDM_ROWID_T | rowId, | ||
RDM_CURSOR * | pCursor | ||
) |
#include <rdmdbapi.h>
Associate an RDM_CURSOR with rows based on a tableId and and rowId.
This function associates the RDM_CURSOR pointed to by pCursor with a row set ordered by rowid. The row set contains all of the rows for the specified table and will initially be positioned to the row specified by the rowid value.
If rowid is not a valid rowid for the specified table an error will be returned and no rows will be associated with the cursor.
If rowid is a valid rowid for the specified table but there is no row at that exact position then the function will return sNOTFOUND and the cursor will be placed in the CURSOR_BETWEEN position. Navigating forward (rdm_cursorMoveToNext()) from that position will position the cursor at the next rowid larger than the specified rowid. Navigating backward (rdm_cursorMoveToPrevious()) from that position will position the cursor at the next rowid smaller than the specified rowid.
sOKAY | Normal, successful return. |
sNOTFOUND | Requested item not found. Success, but no row with the specified rowid, the cursor position is set to CURSOR_BETWEEN. |
eDBNOTOPEN | Database not open. |
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. |
eCURSORDB | Cursor is associated with a different database. |
eINVROWIDVAL | Invalid rowid value. |
ePRECOMMITTED | A precommitted transaction must be committed or rolled back before further operations on this database are allowed. |
[in] | db | A valid RDM database handle |
[in] | tableId | The table identifier for the set of rows |
[in] | rowId | The rowid to position the cursor at |
[out] | pCursor | A pointer to an RDM_CURSOR (must be allocated, associated with db, or set to NULL) |