cursor/insertAdults.c
static RDM_RETCODE insertAdults (
const ADULT *adults,
uint32_t nAdults,
RDM_DB db)
{
RDM_CURSOR inserted = NULL;
uint32_t ii;
for (ii = 0; rc == sOKAY && ii < nAdults; ii++)
{
printf (
"Insert adults with id: %d and name: %s\n", adults[ii].adult_id,
adults[ii].adult_name);
/* We could pass in NULL instead of 'inserted' below */
db, TABLE_ADULT, &adults[ii], sizeof (ADULT), &inserted);
}
rdm_cursorFree (inserted);
return rc;
}
struct RDM_CURSOR_S * RDM_CURSOR
Definition: rdmtypes.h:347
@ sOKAY
Definition: rdmretcodetypes.h:100
RDM_RETCODE rdm_cursorFree(RDM_CURSOR cursor)
Free an RDM_CURSOR.
enum RDM_RETCODE_E RDM_RETCODE
RaimaDB status and error return codes.
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.
struct RDM_DB_S * RDM_DB
Definition: rdmtypes.h:346