What is a Collection?
Collection enables you to temporarily capture one or more non-scalar values. You can use collections to store rows and columns currently in session state so they can be accessed, manipulated, or processed during a user's specific session.
You can think of a collection as a bucket in which you temporarily store rows of information.
Benefits of Collections
Data Persistence across page views
Maintained at session level so they are secure
No extra DDL objects needed in schema
Maintained by the Apex Engine
Maintained in APEX_XXXXXX schema in tables
Referenced using the APEX_COLLECTIONS view
Creating an APEX Collection
Begin
if not apex_collection.collection_exists('DATA_COLLECTION')
then
apex_collection.create_collection('DATA_COLLECTION');
End if;
End;
Add member in Collection
apex_collection.add_member(
p_collection_name => 'DATA_COLLECTION',
p_c001 => '2',
p_c002 => 'Plug-Ins gerecht verwenden',
p_c003 => 'Wann macht ein Plugin Sinn...',
p_c004 => '2015',
p_c005 => 'https://apex.oracle.com/pls/apex/f?p=80307:1'
);
Select Data from Collection
select c001, c002, c003, c004, c005
from apex_collections
where collection_name = 'DATA_COLLECTION'
Collection APIs
תגובות