Functions | |
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_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 char *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... | |
API for updating data for a row identified by a core cursor. 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.
RDM_RETCODE rdm_cursorSetBlobSize | ( | RDM_CURSOR | cursor, |
RDM_COLUMN_ID | columnId, | ||
uint64_t | size | ||
) |
#include <rdmcursorapi.h>
Set the size of a blob column.
This function updates the size of a blob column in current row of cursor.
If size is smaller than the current size of the blob existing data will be truncated.
If size is larger than the current size of the blob the blob will be padded with NULL bytes to extend the size of the blob.
sOKAY | Normal, successful return. |
eREADONLY | Database is read-only and cannot be updated. |
eNOSTARTUPDATE | An update operation was attempted when no 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. |
[in] | cursor | The cursor containing the row with the blob to change the size of |
[in] | columnId | The column identifier of the blob column to change the size of |
[in] | size | The new size of the blob column (in bytes) |
RDM_RETCODE rdm_cursorSetClobSize | ( | RDM_CURSOR | cursor, |
RDM_COLUMN_ID | columnId, | ||
uint64_t | size | ||
) |
#include <rdmcursorapi.h>
Set the size of a clob column.
This function updates the size of a clob column in current row of cursor.
The size of a clob is specified in characters.
If size is smaller than the current size of the clob existing data will be truncated.
If size is larger than the current size of the clob the clob will be padded with NULL characters to extend the size of the clob.
sOKAY | Normal, successful return. |
eREADONLY | Database is read-only and cannot be updated. |
eNOSTARTUPDATE | An update operation was attempted when no 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. |
[in] | cursor | The cursor containing the row with the clob to change the size of |
[in] | columnId | The column identifier of the clob column to change the size of |
[in] | size | The new size of the clob column (in characters) |
RDM_RETCODE rdm_cursorUpdateBlob | ( | RDM_CURSOR | cursor, |
RDM_COLUMN_ID | columnId, | ||
uint64_t | offset, | ||
const void * | value, | ||
size_t | bytesIn | ||
) |
#include <rdmcursorapi.h>
Update a blob column.
This function updates the value of a blob column in current row of cursor.
If offset is smaller than the current size of the blob existing data will be overwritten.
If offset is larger than the current size of the blob the blob will be padded with NULL bytes to extend the size of the blob to offset.
sOKAY | Normal, successful return. |
eREADONLY | Database is read-only and cannot be updated. |
eNOSTARTUPDATE | An update operation was attempted when no 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. |
[in] | cursor | The cursor containing the row with the blob column to be updated |
[in] | columnId | The column identifier of the blob column to be updated |
[in] | offset | The offset into the blob to write the updated content (in bytes) |
[in] | value | A pointer to the content to be written to the blob column |
[in] | bytesIn | The length of the value buffer |
RDM_RETCODE rdm_cursorUpdateClob | ( | RDM_CURSOR | cursor, |
RDM_COLUMN_ID | columnId, | ||
uint64_t | offset, | ||
const char * | value, | ||
size_t | charactersIn | ||
) |
#include <rdmcursorapi.h>
Update a clob column.
This function updates the value of a clob column in current row of cursor.
If offset is smaller than the current size of the clob existing data will be overwritten.
If offset is larger than the current size of the clob the clob will be padded with NULL characters to extend the size of the clob to offset.
sOKAY | Normal, successful return. |
eREADONLY | Database is read-only and cannot be updated. |
eNOSTARTUPDATE | An update operation was attempted when no 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. |
[in] | cursor | The cursor containing the row with the clob column to be updated |
[in] | columnId | The column identifier of the clob column to be updated |
[in] | offset | The character offset into the clob to write the updated content |
[in] | value | A pointer to the content to be written to the clob column |
[in] | charactersIn | The number of characters in the value buffer |
RDM_RETCODE rdm_cursorUpdateColumn | ( | RDM_CURSOR | cursor, |
RDM_COLUMN_ID | columnId, | ||
const void * | columnValue, | ||
size_t | bytesIn | ||
) |
#include <rdmcursorapi.h>
Update a single column in a row.
This function updates the value of a single column in the current row of cursor.
If columnValue is NULL then bytesIn will be ignored and the engine will attempt to set the specified column to the NULL value.
If the cursor is a key scan cursor based on the column that is updated then the cursor will maintain the original position but current row is kept the same. Calling rdm_cursorMoveToNext() or rdm_cursorMoveToPrevious() will position the cursor relative to the original value and not the updated value. The updated value will be in the collection.
The engine validates the size of the buffers prior to accessing them.
sOKAY | Normal, successful return. |
eDUPLICATE | Attempt to insert a duplicate value as a unique/primary key. |
eREADONLY | Database is read-only and cannot be updated. |
eNOSTARTUPDATE | An update operation was attempted when no 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. |
[in] | cursor | The cursor containing the row to be updated |
[in] | columnId | The columns identifier of the column to be updated |
[in] | columnValue | A pointer to the buffer containing the new column value |
[in] | bytesIn | The length of the columnValue buffer (in bytes) |
RDM_RETCODE rdm_cursorUpdateColumnByString | ( | RDM_CURSOR | cursor, |
RDM_COLUMN_ID | columnId, | ||
const char * | columnValue, | ||
size_t | bytesIn | ||
) |
#include <rdmcursorapi.h>
Update a single column in a row from a string.
This function updates the value of a single column in the current row of cursor. This version will convert the value from a string to the schema type for the column.
If columnValue is NULL then the type and bytesIn will be ignored and the engine will attempt to set the specified column to the NULL value.
If the cursor is a key scan cursor based on the column that is updated then the cursor will maintain the original position but current row is kept the same. Calling rdm_cursorMoveToNext() or rdm_cursorMoveToPrevious() will position the cursor relative to the original value and not the updated value. The updated value will be in the collection.
The engine validates the size of the buffers prior to accessing them.
sOKAY | Normal, successful return. |
eDUPLICATE | Attempt to insert a duplicate value as a unique/primary key. |
eREADONLY | Database is read-only and cannot be updated. |
eNOSTARTUPDATE | An update operation was attempted when no 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. |
[in] | cursor | The cursor containing the row to be updated |
[in] | columnId | The columns identifier of the column to be updated |
[in] | columnValue | A pointer to the buffer containing the new column value |
[in] | bytesIn | The length of the columnValue buffer |
RDM_RETCODE rdm_cursorUpdateRow | ( | RDM_CURSOR | cursor, |
const void * | colValues, | ||
size_t | bytesIn | ||
) |
#include <rdmcursorapi.h>
Update all columns in a row.
This function updates all column values, except for blobs, in current row of cursor.
For each column that is not designated as NOT NULL a _has_value
field is added to the table structure. If the _has_value
field for a column is not set the value for the column will be considered NULL and anything in the structure value field for the column will be ignored.
The engine validates the size of the buffers prior to accessing them.
If the cursor is a key scan cursor then the cursor will maintain the original position but current row is kept the same. Calling rdm_cursorMoveToNext() or rdm_cursorMoveToPrevious() will position the cursor relative to the original position and not the updated position. The updated position will be in the collection.
sOKAY | Normal, successful return. |
eDUPLICATE | Attempt to insert a duplicate value as a unique/primary key. |
eREADONLY | Database is read-only and cannot be updated. |
eNOSTARTUPDATE | An update operation was attempted when no rdm_dbStartUpdate() is active. |
eNOTLOCKED | Attempt to access a table for reading or update without proper locks. |
eDBNOTOPEN | Database not open. |
eCATMISMATCH | Catalog in memory does not match Catalog on disk. The database definition does not match what is expected for this application. |
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. |
[in] | cursor | The cursor containing the row to be updated |
[in] | colValues | A buffer that contains the column values of the row to be inserted formatted as the table structure generated when the database schema was compiled. If the table definition has changed since the schema was first compiled a new header file will need to be generated. |
[in] | bytesIn | The length of the colValues buffer. If colValues is NULL this value should be 0. |