cursor/initialize_get_find_TheKing.c
static RDM_ROWID_T kingRowId;
static RDM_ROWID_T kingsClubRowId;
{
RDM_RETCODE rc;
RDM_CURSOR theKing = NULL;
rc = rdm_dbGetRowsByKeyAtKey (
db, KEY_ADULT_ADULT_NAME, "The King", 0, &theKing);
{
rc = rdm_cursorGetRowId (theKing, &kingRowId);
rc = rdm_cursorGetOwnerRowId (theKing, REF_MEMBERS, &kingsClubRowId);
}
rdm_cursorFree (theKing);
return rc;
}
{
RDM_RETCODE rc;
rc = rdm_dbGetRowsAtRowId (db, TABLE_ADULT, kingRowId, theKing);
/* Create a singleton for it */
if (rc == sOKAY)
{
rc = rdm_cursorGetSelf (*theKing, theKing);
}
return rc;
}
{
RDM_RETCODE rc;
rc = rdm_cursorMoveToRowId (adults, kingRowId);
return rc;
}
RDM_RETCODE rdm_cursorGetSelf(RDM_CURSOR sourceCursor, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with the current row of the sourceCursor.
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_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_RETCODE rdm_cursorGetOwnerRowId(RDM_CURSOR cursor, RDM_REF_ID refId, RDM_ROWID_T *rowid)
Get the rowid of a set owner.
RDM_RETCODE rdm_cursorGetRowId(RDM_CURSOR cursor, RDM_ROWID_T *rowid)
Get the rowid for the current row of the cursor.