Modify a row or collection
HCL OneDB™ ODBC Driver provides functions that can be used to modify rows and collections.
The following table provides an overview of the functions
that HCL
OneDB ODBC Driver provides
for modifying rows and collections.
Function | Modification | Row | Collection |
---|---|---|---|
ifx_rc_delete() | Delete an element | No | Yes |
ifx_rc_insert() | Insert an element | No | Yes (See the following table.) |
ifx_rc_setnull() | Set the row or collection to null | Yes | Yes |
ifx_rc_update() | Update the value of an element | Yes | Yes |
The following table describes the collection locations
into which you can insert an element. You can insert an element only
at the end of a SET or MULTISET collection because elements in these
types of collections do not have ordered positions.
Beginning | Middle | End | |
---|---|---|---|
List | Yes | Yes | Yes |
Multiset | No | No | Yes |
Set | No | No | Yes |
Tip: If you only need to insert
or update a row or collection column with literal values, you do not
need to use a row or collection buffer. Instead, you can explicitly
list the literal value in either the INTO clause of the INSERT statement
or the SET clause of the UPDATE statement.
Each row and collection maintains a seek position that
points to the current element in the row or collection. When the row
or collection is created, the seek position points to the first element
that is in the row or collection. All calls to client functions share
the same seek position for a row or collection buffer. Therefore,
one client function can affect the seek position for another client
function that uses the same buffer handle. The following table describes
how client functions use and modify the seek position.
Client function | Acts on | Changes |
---|---|---|
ifx_rc_delete() | At the specified position | Sets the seek position to the position after the one that was deleted |
ifx_rc_fetch() | At the specified position | Sets the seek position to the specified position |
ifx_rc_insert() | Before the specified position | Sets the seek position to the specified position |
ifx_rc_update() | At the specified position | Sets the seek position to the specified position |