rdmcursorapi.h File Reference

Header for the RDM Cursor APIs. More...

#include "rdmtypes.h"#include "rdmrowidtypes.h"
Include dependency graph for rdmcursorapi.h:
This graph shows which files directly or indirectly include this file:

Functions

RDM_RETCODE rdm_cursorAddMember (RDM_CURSOR setCursor, RDM_CURSOR memberCursor)
Add a row to a set cursor (link) More...
RDM_RETCODE rdm_cursorClose (RDM_CURSOR cursor)
Close an RDM_CURSOR. More...
RDM_RETCODE rdm_cursorComparePosition (RDM_CURSOR cursorPrimary, RDM_CURSOR cursorSecondary, RDM_CURSOR_COMPARE *comparison)
compare the position of a cursor relative to another cursor More...
RDM_RETCODE rdm_cursorDeleteRow (RDM_CURSOR cursor)
Delete a row from a table. More...
RDM_RETCODE rdm_cursorFree (RDM_CURSOR cursor)
Free an RDM_CURSOR. More...
RDM_RETCODE rdm_cursorGetBlobSize (RDM_CURSOR cursor, RDM_COLUMN_ID columnId, uint64_t *size)
Get the current size of a blob column. More...
RDM_RETCODE rdm_cursorGetClobSize (RDM_CURSOR cursor, RDM_COLUMN_ID columnId, uint64_t *numCharacters)
Get the current size of a clob column. More...
RDM_RETCODE rdm_cursorGetClone (RDM_CURSOR sourceCursor, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR as a clone of an existing RDM_CURSOR. More...
RDM_RETCODE rdm_cursorGetCount (RDM_CURSOR cursor, uint64_t *count)
Get the row count for a cursor. More...
RDM_RETCODE rdm_cursorGetDatabase (RDM_CURSOR cursor, RDM_DB *pDb)
Get the RDM_DB handle associated with a cursor. More...
RDM_RETCODE rdm_cursorGetLockStatus (RDM_CURSOR cursor, RDM_LOCK_STATUS *status)
Get the lock status of a table. More...
RDM_RETCODE rdm_cursorGetMemberCount (RDM_CURSOR cursor, RDM_REF_ID refId, uint64_t *memberCount)
Get the member count for a set owner row. More...
RDM_RETCODE rdm_cursorGetMemberRows (RDM_CURSOR ownerCursor, RDM_REF_ID refId, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with members. More...
RDM_RETCODE rdm_cursorGetOwnerRow (RDM_CURSOR memberCursor, RDM_REF_ID refId, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with a set owner. More...
RDM_RETCODE rdm_cursorGetOwnerRowId (RDM_CURSOR cursor, RDM_REF_ID refId, RDM_ROWID_T *rowid)
Get the rowid of a set owner. More...
RDM_RETCODE rdm_cursorGetOwnerTableId (RDM_CURSOR cursor, RDM_REF_ID refId, RDM_TABLE_ID *tableId)
Get the table id for the refId owner for the current row of a cursor. More...
RDM_RETCODE rdm_cursorGetRowId (RDM_CURSOR cursor, RDM_ROWID_T *rowid)
Get the rowid for the current row of the cursor. More...
RDM_RETCODE rdm_cursorGetRowStatus (RDM_CURSOR cursor, RDM_ROW_STATUS_INFO *rowStat)
Get the row status information for a status cursor. More...
RDM_RETCODE rdm_cursorGetRowsAtPosition (RDM_CURSOR sourceCursor, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with rows from a table ordered by rowid and positioned to the same row as the source cursor. More...
RDM_RETCODE rdm_cursorGetRowsByKeyAtPosition (RDM_CURSOR sourceCursor, RDM_KEY_ID keyId, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with a row set based on a key and positioned to the same row as the source cursor. More...
RDM_RETCODE rdm_cursorGetRowsInReverseOrder (RDM_CURSOR sourceCursor, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR as a copy of an existing RDM_CURSOR with the rows in reverse order. More...
RDM_RETCODE rdm_cursorGetSelf (RDM_CURSOR sourceCursor, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with the current row of the sourceCursor. More...
RDM_RETCODE rdm_cursorGetSiblingRows (RDM_CURSOR memberCursor, RDM_REF_ID refId, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with siblings. More...
RDM_RETCODE rdm_cursorGetSiblingRowsAtPosition (RDM_CURSOR memberCursor, RDM_REF_ID refId, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with siblings. More...
RDM_RETCODE rdm_cursorGetStatus (RDM_CURSOR cursor, RDM_CURSOR_STATUS *position)
Check a cursor for special conditions. More...
RDM_RETCODE rdm_cursorGetTableId (RDM_CURSOR cursor, RDM_TABLE_ID *tableId)
Get the table id for the current row of the cursor. More...
RDM_RETCODE rdm_cursorGetType (RDM_CURSOR cursor, RDM_CURSOR_TYPE *type)
Get the cursor type. More...
RDM_RETCODE rdm_cursorHasMembers (RDM_CURSOR cursor, RDM_REF_ID refId, RDM_BOOL_T *hasMembers)
Check to see if a row has members for the specified set. More...
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. More...
RDM_RETCODE rdm_cursorIsAfterLast (RDM_CURSOR cursor, RDM_BOOL_T *isAfterLast)
Check to see if a cursor is positioned after the last row in a collection. More...
RDM_RETCODE rdm_cursorIsBeforeFirst (RDM_CURSOR cursor, RDM_BOOL_T *isBeforeFirst)
Check to see if a cursor is positioned before the first row in a collection. More...
RDM_RETCODE rdm_cursorLinkRow (RDM_CURSOR cursor, RDM_REF_ID refId, RDM_CURSOR cursorOwner)
Link a row to an owner. More...
RDM_RETCODE rdm_cursorMoveToAfterLast (RDM_CURSOR cursor)
Position a cursor to the AfterLast position. More...
RDM_RETCODE rdm_cursorMoveToBeforeFirst (RDM_CURSOR cursor)
Position a cursor to the BeforeFirst position. More...
RDM_RETCODE rdm_cursorMoveToFirst (RDM_CURSOR cursor)
Position a cursor to the first row in the collection. More...
RDM_RETCODE rdm_cursorMoveToKey (RDM_CURSOR cursor, RDM_KEY_ID keyId, const void *keyValue, size_t bytesIn)
Position a cursor based on a key value. More...
RDM_RETCODE rdm_cursorMoveToLast (RDM_CURSOR cursor)
Position a cursor to the last row in the collection. More...
RDM_RETCODE rdm_cursorMoveToNext (RDM_CURSOR cursor)
Position a cursor to the next row in the collection. More...
RDM_RETCODE rdm_cursorMoveToPosition (RDM_CURSOR cursor1, RDM_CURSOR cursor2)
Position a cursor based on the currow row of another cursor. More...
RDM_RETCODE rdm_cursorMoveToPrevious (RDM_CURSOR cursor)
Position a cursor to the previous row in the collection. More...
RDM_RETCODE rdm_cursorMoveToRowId (RDM_CURSOR cursor, RDM_ROWID_T rowid)
Position a cursor based on a rowid. More...
RDM_RETCODE rdm_cursorMoveToSearchKey (RDM_CURSOR cursor, RDM_KEY_ID keyId, const RDM_SEARCH_KEY *keyValue)
Position a cursor based on a key value. More...
RDM_RETCODE rdm_cursorReadBlob (RDM_CURSOR cursor, RDM_COLUMN_ID columnId, uint64_t offset, void *value, size_t bytesIn, size_t *bytesOut)
Read data from a blob column. More...
RDM_RETCODE rdm_cursorReadClob (RDM_CURSOR cursor, RDM_COLUMN_ID columnId, uint64_t offset, char *value, size_t bytesIn, size_t *bytesOut, size_t *charactersOut)
Read data from a clob column as UTF-8. More...
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. More...
RDM_RETCODE rdm_cursorReadColumnIntoString (RDM_CURSOR cursor, RDM_COLUMN_ID columnId, RDM_TCHAR_T *columnValue, size_t inBytes, size_t *bytesOut)
Read and convert a single column to a string. More...
RDM_RETCODE rdm_cursorReadKey (RDM_CURSOR cursor, RDM_KEY_ID keyId, void *keyValue, size_t bytesIn, size_t *bytesOut)
Read the columns for a key from a table row. More...
RDM_RETCODE rdm_cursorReadRow (RDM_CURSOR cursor, void *colValues, size_t bytesIn, size_t *bytesOut)
Read all columns from a row. More...
RDM_RETCODE rdm_cursorRelinkRow (RDM_CURSOR cursor, RDM_REF_ID refId, RDM_CURSOR cursorOwner)
Unlink a row from one owner and link to another. More...
RDM_RETCODE rdm_cursorRemoveMember (RDM_CURSOR setCursor)
Remove a row from a set cursor (unlink) More...
RDM_RETCODE rdm_cursorSetBlobSize (RDM_CURSOR cursor, RDM_COLUMN_ID columnId, uint64_t size)
Set the size of a blob column. More...
RDM_RETCODE rdm_cursorSetClobSize (RDM_CURSOR cursor, RDM_COLUMN_ID columnId, uint64_t size)
Set the size of a clob column. More...
RDM_RETCODE rdm_cursorUnlinkAndDeleteRow (RDM_CURSOR cursor)
Unlink a row from all sets and delete it. More...
RDM_RETCODE rdm_cursorUnlinkRow (RDM_CURSOR cursor, RDM_REF_ID refId)
Unlink a row from its owner. More...
RDM_RETCODE rdm_cursorUpdateBlob (RDM_CURSOR cursor, RDM_COLUMN_ID columnId, uint64_t offset, const void *value, size_t bytesIn)
Update a blob column. More...
RDM_RETCODE rdm_cursorUpdateClob (RDM_CURSOR cursor, RDM_COLUMN_ID columnId, uint64_t offset, const char *value, size_t charactersIn)
Update a clob column. More...
RDM_RETCODE rdm_cursorUpdateColumn (RDM_CURSOR cursor, RDM_COLUMN_ID columnId, const void *columnValue, size_t bytesIn)
Update a single column in a row. More...
RDM_RETCODE rdm_cursorUpdateColumnByString (RDM_CURSOR cursor, RDM_COLUMN_ID columnId, const RDM_TCHAR_T *columnValue, size_t bytesIn)
Update a single column in a row from a string. More...
RDM_RETCODE rdm_cursorUpdateRow (RDM_CURSOR cursor, const void *colValues, size_t bytesIn)
Update all columns in a row. More...

Detailed Description

Header for the RDM Cursor APIs.

Function Documentation

rdm_cursorReadBlob()

RDM_RETCODE rdm_cursorReadBlob ( RDM_CURSOR cursor,
RDM_COLUMN_ID columnId,
uint64_t offset,
void * value,
size_t bytesIn,
size_t * bytesOut
)

Read data from a blob column.

This function reads contents of a blob column from the current row of cursor.

The read will start from the offset position and will attempt to read up to bytesIn bytes. If there are not bytesIn bytes left to read and the bytesOut parameter is NULL then the function will return the eBLOBBADSIZE error code.

If bytesOut is not NULL then the number of bytes actually read into value will be put into that parameter.

If value is NULL and bytesOut is not NULL then bytesOut will have the remaining number of bytes to be read from the offset position.

Locking Requirements
Read lock on the tables associated with the cursor.
Return values
sOKAY Normal, successful return.
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.
eDBNOTOPEN Database not open.
eNOCURRENTROW The cursor is not positioned to a valid row.
eOWNERDELETED The owner row for a set cursor has been deleted.
eSINGLETONDELETED The row for a singleton cursor has been deleted.
See also
rdm_dbStartRead
rdm_dbGetRows
rdm_cursorMoveToNext
rdm_cursorGetBlobSize
rdm_cursorReadClob
rdm_cursorReadRow
rdm_cursorReadColumn
rdm_cursorReadKey
rdm_dbInsertRow
rdm_cursorUpdateRow
rdm_cursorDeleteRow
rdm_cursorLinkRow
rdm_dbEnd
rdmcompile
Parameters
[in] cursor [in] The cursor to read data from
[in] columnId [in] The column identifier of the blob column to read
[in] offset [in] Offset into the blob to begin reading
[in] value [in] A pointer to the buffer where the the column data will be placed
[in] bytesIn [in] The length the the value buffer (in bytes for both CLOB and BLOB columns)
[out] bytesOut [out] A pointer to the number of bytes actually read