Cursor Initialization Functions
Collaboration diagram for Cursor Initialization Functions:

Functions

RDM_RETCODE rdm_dbAllocCursor (RDM_DB db, RDM_CURSOR *pCursor)
 Allocate a cursor. More...
 

Detailed Description

Cursor initialization API for the core database. 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.

Function Documentation

◆ rdm_dbAllocCursor()

RDM_RETCODE rdm_dbAllocCursor ( RDM_DB  db,
RDM_CURSOR pCursor 
)

#include <rdmdbapi.h>

Allocate a cursor.

This function allocates and initializes a cursor. The new cursor is associated with the specified database. Once a cursor has been initialized it can be used in other RDM_CURSOR function calls.

An allocated cursor is not associated with any rows. One of the association functions (rdm_dbGet*, rdm_cursorGet*, and rdm_dbInsert*) need to be called to associate the cursor with a collection of rows. Most of the other cursor APIs will return an error if called with a cursor that is allocated but not yet associated with rows.

It is not necessary to explicitly allocate a cursor. The association functions will automatically allocate a cursor if the pCursor parameter is set to NULL prior to calling the association function.

Locking Requirements
None
Return values
sOKAYNormal, successful return.
eDBNOTOPENDatabase not open.
eCURSORDBCursor is associated with a different database.
ePRECOMMITTEDA precommitted transaction must be committed or rolled back before further operations on this database are allowed.
Parameters
[in]dbA valid RDM database handle
[out]pCursorThe cursor to be allocated
Examples
c-core/01_helloworld_c/core01Example_main.c, c-core/02_core/core02Example_main.c, c-core/18_core/core18Example_main.c, c-core/20_core/core20Example_main.c, c-core/21_core/core21Example_main.c, c-core/22_core/core22Example_main.c, and c-core/23_core/core23Example_main.c.

Referenced by RDM::TIME_SERIES::insert_row< table_id >::init().

Here is the caller graph for this function: