Functions | |
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. More... | |
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 the specified key value. More... | |
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 the specified key value. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Cursor association API for retrieving rows in key 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_dbGetRowsByKey | ( | RDM_DB | db, |
RDM_KEY_ID | keyId, | ||
RDM_CURSOR * | pCursor | ||
) |
#include <rdmdbapi.h>
Associate an RDM_CURSOR with a row set based on a key.
This function associates the RDM_CURSOR pointed to by pCursor with a row set ordered by the specified key. The row set will contain all of the rows for the table of the key specified. The RDM_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. |
eINVKEYID | Invalid key id. |
eISRTREE | The key specified is an rtree index. |
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] | keyId | The RDM key id |
[out] | pCursor | A pointer to an RDM_CURSOR (must be allocated, associated with db, or set to NULL) |
Referenced by RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, AGGREGATE_T, NEXT >::put_range(), RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, AGGREGATE_T, NEXT >::put_stat(), and RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, AGGREGATE_T, NEXT >::put_value().
RDM_RETCODE rdm_dbGetRowsByKeyAtKey | ( | RDM_DB | db, |
RDM_KEY_ID | keyId, | ||
const void * | keyValue, | ||
size_t | len, | ||
RDM_CURSOR * | pCursor | ||
) |
#include <rdmdbapi.h>
Associate an RDM_CURSOR with a row set that is ordered by key value and is initially positioned at the specified key value.
This function associates a row set ordered by the specified key with the RDM_CURSOR pointed to by pCursor. The row set contains all of the rows for the table that the specified key is in.
The RDM_CURSOR will be initially positioned at the first row that matches the specified key value. If there is not an exact match then the RDM_CURSOR will be placed in the CURSOR_BETWEEN position. Navigating forward (rdm_cursorMoveToNext()) from that position will position the RDM_CURSOR at the next key value larger than the specified key value. Navigating backward (rdm_cursorMoveToPrevious()) from that position will position the RDM_CURSOR at the next key value smaller than the specified key value.
The engine validates the size of the buffers prior to accessing them.
sOKAY | Normal, successful return. |
sNOTFOUND | Requested item not found. Success, but no exact key value match, the cursor position is set to CURSOR_BETWEEN. |
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. |
eDBNOTOPEN | Database not open. |
eINVCURSORID | Invalid cursor id. |
eINVKEYID | Invalid key id. |
eISRTREE | The key specified is an rtree index. |
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] | keyId | The RDM key id |
[in] | keyValue | The key value used to position the cursor |
[in] | len | The length of the key value buffer |
[out] | pCursor | A pointer to an RDM_CURSOR (must be allocated, associated with db, or set to NULL) |
RDM_RETCODE rdm_dbGetRowsByKeyAtSearchKey | ( | RDM_DB | db, |
RDM_KEY_ID | keyId, | ||
const RDM_SEARCH_KEY * | keyValue, | ||
RDM_CURSOR * | pCursor | ||
) |
#include <rdmdbapi.h>
Associate an RDM_CURSOR with a row set that is ordered by key value and is initially positioned at the specified key value.
This function associates a row set ordered by the specified key with the RDM_CURSOR pointed to by pCursor. The row set contains all of the rows for the table that the specified key is in.
The RDM_CURSOR will be initially positioned at the first row that matches the specified key value. If there is not an exact match then the RDM_CURSOR will be placed in the CURSOR_BETWEEN position. Navigating forward (rdm_cursorMoveToNext()) from that position will position the RDM_CURSOR at the next key value larger than the specified key value. Navigating backward (rdm_cursorMoveToPrevious()) from that position will position the RDM_CURSOR at the next key value smaller than the specified key value.
The engine validates the size of the buffers prior to accessing them.
sOKAY | Normal, successful return. |
sNOTFOUND | Requested item not found. Success, but no exact key value match, the cursor position is set to CURSOR_BETWEEN. |
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. |
eDBNOTOPEN | Database not open. |
eINVCURSORID | Invalid cursor id. |
eINVKEYID | Invalid key id. |
eISRTREE | The key specified is an rtree index. |
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] | keyId | The RDM key id |
[in] | keyValue | The key value used to position the cursor |
[out] | pCursor | A pointer to an RDM_CURSOR (must be allocated, associated with db, or set to NULL) |
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 | ||
) |
#include <rdmdbapi.h>
Associate an RDM_CURSOR with rows in a specified key range.
This function associates the RDM_CURSOR pointed to by pCursor with a row set ordered by the specified key. The row set contains all of the rows for the table that have a key value that is in the range specified by the start and end values. If the specified start value is NULL then the start of the range will be the first index value. If the end value is NULL then the end of the range will be the last index value. Specifying a start value of NULL and an end value of NULL is equivalent to rdm_dbGetRowsByKey().
For a key that allows duplicate values it can be useful to specify the same value for the start and the end range. For example, the foreign side of a primary foreign key relationship can be retrieved by specifying the primary key value as the start and end value of a key on the foreign table that references the primary key of the primary table. If the index is unique then specifying the same start and end value will result in at most one row in the cursor collection.
The cursor will be initially positioned to the BeforeFirst location.
The engine checks the size of buffers prior to accessing them.
sOKAY | Normal, successful return. |
sNOTFOUND | Requested item not found. Success, but no exact key value match, the cursor position is set to CURSOR_BETWEEN. |
eCURSORDB | Cursor is associated with a different database. |
eDBNOTOPEN | Database not open. |
eINVCURSORID | Invalid cursor id. |
eINVKEYID | Invalid key id. |
eISRTREE | The key specified is an rtree index. |
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] | keyId | The RDM key id |
[in] | startValue | The value for the start of the range |
[in] | bytesInStartValue | the size of startValue in bytes |
[in] | endValue | The value for the end of the range |
[in] | bytesInEndValue | the size of endValue in bytes |
[out] | pCursor | A pointer to an RDM_CURSOR (must be allocated, associated with db, or set to NULL) |
RDM_RETCODE rdm_dbGetRowsByKeyInRangeKeyRange | ( | RDM_DB | db, |
RDM_KEY_ID | keyId, | ||
const RDM_RANGE_KEY * | startValue, | ||
const RDM_RANGE_KEY * | endValue, | ||
RDM_CURSOR * | pCursor | ||
) |
#include <rdmdbapi.h>
Associate an RDM_CURSOR with rows in a specified key range.
This function associates the RDM_CURSOR pointed to by pCursor with a row set ordered by the specified key. The row set contains all of the rows for the table that have a key value that is in the range specified by the start and end values. If the specified start value is NULL then the start of the range will be the first index value stored in the database. If the end value is NULL then the end of the range will be the last index value stored in the database. Specifying a start value of NULL and an end value of NULL is equivalent to rdm_dbGetRowsByKey().
For a key that allows duplicate values it can be useful to specify the same value for the start and the end range. For example, the foreign side of a primary foreign key relationship can be retrieved by specifying the primary key value as the start and end value of a key on the foreign table that references the primary key of the primary table. If the index is unique then specifying the same start and end value will result in at most one row in the cursor collection.
The range can either be 'inclusive' or 'exclusive'. If the range field in the RDM_RANGE_KEY is set to RDM_RANGE_OPEN keys that match the value will be included in the result set. If the range field in RDM_RANGE_KEY is RDM_RANGE_CLOSED then keys that match the value will not be included in the result set.
The cursor will be initially positioned to the BeforeFirst location.
sOKAY | Normal, successful return. |
sNOTFOUND | Requested item not found. Success, but no exact key value match, the cursor position is set to CURSOR_BETWEEN. |
eCURSORDB | Cursor is associated with a different database. |
eDBNOTOPEN | Database not open. |
eINVCURSORID | Invalid cursor id. |
eINVKEYID | Invalid key id. |
eISRTREE | The key specified is an rtree index. |
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] | keyId | The RDM key id |
[in] | startValue | The value for the start of the range |
[in] | endValue | The value for the end of the range |
[out] | pCursor | A pointer to an RDM_CURSOR (must be allocated, associated with db, or set to NULL) |
RDM_RETCODE rdm_dbGetRowsByKeyInRtreeKeyRange | ( | RDM_DB | db, |
RDM_KEY_ID | keyId, | ||
const RDM_RTREE_KEY * | keyValue, | ||
RDM_CURSOR * | pCursor | ||
) |
#include <rdmdbapi.h>
Associate an RDM_CURSOR with a row set based on a R-tree.
This function associates the RDM_CURSOR pointed to by pCursor with a row set based on the the specified R-tree index. The row set will contain all of the rows for the table of the key specified that match the search criteria. The RDM_CURSOR will be initially positioned in the BeforeFirst position.
sOKAY | Normal, successful return. |
sNOTFOUND | Requested item not found. Success, but no exact key value match, the cursor position is set to CURSOR_BETWEEN. |
eCURSORDB | Cursor is associated with a different database. |
eDBNOTOPEN | Database not open. |
eINVCURSORID | Invalid cursor id. |
eINVKEYID | Invalid key id. |
eNOTRTREE | The key specified is not an rtree index. |
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] | keyId | The RDM key id |
[in] | keyValue | The key value used to position the cursor |
[out] | pCursor | A pointer to an RDM_CURSOR (must be allocated, associated with db, or set to NULL) |
RDM_RETCODE rdm_dbGetRowsByKeyInSearchKeyRange | ( | RDM_DB | db, |
RDM_KEY_ID | keyId, | ||
const RDM_SEARCH_KEY * | startValue, | ||
const RDM_SEARCH_KEY * | endValue, | ||
RDM_CURSOR * | pCursor | ||
) |
#include <rdmdbapi.h>
Associate an RDM_CURSOR with rows in a specified key range.
This function associates the RDM_CURSOR pointed to by pCursor with a row set ordered by the specified key. The row set contains all of the rows for the table that have a key value that is in the range specified by the start and end values. If the specified start value is NULL then the start of the range will be the first index value. If the end value is NULL then the end of the range will be the last index value. Specifying a start value of NULL and an end value of NULL is equivalent to rdm_dbGetRowsByKey().
For a key that allows duplicate values it can be useful to specify the same value for the start and the end range. For example, the foreign side of a primary foreign key relationship can be retrieved by specifying the primary key value as the start and end value of a key on the foreign table that references the primary key of the primary table. If the index is unique then specifying the same start and end value will result in at most one row in the cursor collection.
The cursor will be initially positioned to the BeforeFirst location.
The engine validates the size of buffers prior to accessing them.
sOKAY | Normal, successful return. |
sNOTFOUND | Requested item not found. Success, but no exact key value match, the cursor position is set to CURSOR_BETWEEN. |
eCURSORDB | Cursor is associated with a different database. |
eDBNOTOPEN | Database not open. |
eINVCURSORID | Invalid cursor id. |
eINVKEYID | Invalid key id. |
eISRTREE | The key specified is an rtree index. |
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] | keyId | The RDM key id |
[in] | startValue | The value for the start of the range |
[in] | endValue | The value for the end of the range |
[out] | pCursor | A pointer to an RDM_CURSOR (must be allocated, associated with db, or set to NULL) |