Previous |
Next |
Topics:
When data elements (or members) are added to a collection, they are assigned a unique sequence ID. As you add members to a collection, the sequence ID will change in increments of 1, with the newest members having the largest ID.
You add new members to a collection using the ADD_MEMBER function
. Calling this function returns the sequence ID of the newly added member.
You can also add new members (or an array of members) to a collection using the ADD_MEMBERS
procedure. The number of members added is based on the number of elements in the first array.
Use the p_generate_md5
flag to specify if the message digest of the data of the collection member should be computed. By default, this flag is set to NO
. Use this parameter to check the MD5 of the collection member (that is, compare it with another member or see if a member has changed).
Use p_clob001
for collection member attributes which exceed 4,000 characters. Use p_blob001
for binary collection member attributes. Use p_xmltype001
to store well-formed XML.
You can update collection members by calling the UPDATE_MEMBER
procedure and referencing the desired collection member by its sequence ID. The UPDATE_MEMBER
procedure replaces an entire collection member, not individual member attributes.
Use the p_clob001
parameter for collection member attributes which exceed 4,000 characters.
To update a single attribute of a collection member, use the UPDATE_MEMBER_ATTRIBUTE procedure
.
You can delete a collection member by calling the DELETE_MEMBER
procedure and referencing the desired collection member by its sequence ID. Note that this procedure leaves a gap in the sequence IDs in the specified collection.
You can also delete all members from a collection by when an attribute matches a specific value. Note that the DELETE_MEMBERS
procedure also leaves a gap in the sequence IDs in the specified collection. If the supplied attribute value is null, then all members of the named collection will be deleted where the attribute (specified by p_attr_number
) is null.