cursor/printChildrenNamesWithUnknownFather.c
static RDM_RETCODE printChildrenNamesWithUnknownFather (RDM_CURSOR children)
{
char name[32];
rc = rdm_cursorMoveToFirst (children);
while (rc == sOKAY)
{
RDM_BOOL_T knownFather;
rc = rdm_cursorHasOwner (children, REF_FATHERS_CHILDREN, &knownFather);
if (rc == sOKAY && knownFather == RDM_FALSE)
{
children, COL_CHILD_CHILD_NAME, name, sizeof (name), NULL);
if (rc == sOKAY)
{
printf ("Child with unknown father and name: %s\n", name);
}
}
if (rc == sOKAY)
{
rc = rdm_cursorMoveToNext (children);
}
}
if (rc == sENDOFCURSOR)
rc = sOKAY;
return rc;
}
RDM_RETCODE rdm_cursorMoveToFirst(RDM_CURSOR cursor)
Position a cursor to the first row in the collection.
RDM_RETCODE rdm_cursorMoveToNext(RDM_CURSOR cursor)
Position a cursor to the next row in the collection.
@ RDM_FALSE
Definition: psptypes.h:59
RDM_RETCODE rdm_cursorHasOwner(RDM_CURSOR cursor, RDM_REF_ID refId, RDM_BOOL_T *hasOwner)
Check to see if a row is a member for the specified set.
struct RDM_CURSOR_S * RDM_CURSOR
Definition: rdmtypes.h:306
@ sOKAY
Definition: rdmretcodetypes.h:97
RDM_BOOL_T
Definition: psptypes.h:58
RDM_RETCODE rdm_cursorReadColumn(RDM_CURSOR cursor, RDM_COLUMN_ID columnId, void *columnValue, size_t bytesIn, size_t *bytesOut)
Read a single column from a table row.
@ sENDOFCURSOR
Definition: rdmretcodetypes.h:58
RDM_RETCODE
RDM status and error return codes.
Definition: rdmretcodetypes.h:43