Home > Advanced Programming Techni... > Using Collections > Determining Collection Status
Previous |
Next |
The p_generate_md5
parameter determines if the MD5 message digests are computed for each member of a collection. The collection status flag is set to FALSE
immediately after you create a collection. If any operations are performed on the collection (such as add, update, truncate, and so on), this flag is set to TRUE
.
You can reset this flag manually by calling RESET_COLLECTION_CHANGED
, for example:
APEX_COLLECTION.RESET_COLLECTION_CHANGED ( p_collection_name => collection name)
Once this flag has been reset, you can determine if a collection has changed by calling COLLECTION_HAS_CHANGED
, for example:
l_changed := APEX_COLLECTION.COLLECTION_HAS_CHANGED( p_collection_name => collection_name);
When you add a new member to a collection, an MD5 message digest is computed against all 50 attributes and the CLOB attribute if the p_generated_md5
parameter is set to YES
. You can access this value from the MD5_ORIGINAL
column of the view APEX_COLLECTION
. You can access the MD5 message digest for the current value of a specified collection member by using the function GET_MEMBER_MD5
. For example:
APEX_COLLECTION.GET_MEMBER_MD5 ( p_collection_name => collection name, p_seq => member sequence number ); RETURN VARCHAR2;