ORDS Setup plsql
Posted: Sat Jan 22, 2022 6:35 am
Code: Select all
DECLARE
v_module_name VARCHAR2 (200) DEFAULT 'erpstuff.com.hr';
v_pattern VARCHAR2 (200) DEFAULT 'dept/:deptno';
/*
This code is only for demo purposes so use this code in your environment at your own risk.
https://erpstuff.com
version:demo_1
22-JAN-2022
*/
BEGIN
ORDS.define_module (p_module_name => v_module_name,
p_base_path => '/xx_hr/',
p_items_per_page => 0);
ORDS.define_template (p_module_name => v_module_name,
p_pattern => v_pattern);
ORDS.define_handler (
p_module_name => v_module_name,
p_pattern => v_pattern,
p_method => 'GET',
p_source_type => ORDS.source_type_collection_feed,
p_source => 'select * from dept where DEPTNO = :deptno',
p_items_per_page => 0);
ORDS.define_parameter (p_module_name => v_module_name,
p_pattern => v_pattern,
p_method => 'GET',
p_name => 'empno',
p_bind_variable_name => 'empno',
p_source_type => 'URI',
p_param_type => 'STRING',
p_access_method => 'IN');
END;
Code: Select all
DECLARE
v_module_name USER_ORDS_MODULES.name%type DEFAULT 'erpstuff.com.hr';
v_pattern user_ords_templates.uri_template%type DEFAULT 'dept/:deptno';
/*
This code is only for demo purposes so use this code in your environment at your own risk.
https://erpstuff.com
version:demo_1
22-JAN-2022
*/
BEGIN
ORDS.DEFINE_SERVICE(
p_module_name => v_module_name, --ords_modules.name%type
p_base_path => '/xx_hr/', --ords_modules.uri_prefix%type
p_pattern => v_pattern, --ords_templates.uri_template%type
p_method => 'GET', --ords_handlers.method%type
p_source_type => ords.source_type_collection_feed, --ords_handlers.source_type%type
p_source => 'select * from dept where DEPTNO = :deptno', --ords_handlers.source%type,
p_items_per_page => 25, --
p_status => 'PUBLISHED', --ords_modules.status%type
p_etag_type => 'HASH', --ords_templates.etag_type%type
p_module_comments => NULL, --ords_modules.comments%type DEFAULT
p_template_comments => NULL, --ords_modules.comments%type DEFAULT
p_handler_comments => NULL); --ords_modules.comments%type DEFAULT
end;
https://youtu.be/p3F7KRSMaao
https://youtu.be/41z9e6zQO5g
https://youtu.be/SQZYExiN_-w