Merge remote-tracking branch 'refs/remotes/mortenbra/master'
This commit is contained in:
commit
c047a9a96c
@ -75,7 +75,7 @@ This library is a collection of various utility packages for PL/SQL, as well as
|
||||
|
||||
##Parse JSON using PL/SQL
|
||||
|
||||
* http://sourceforge.net/projects/pljson/
|
||||
* https://github.com/pljson/pljson
|
||||
* http://reseau.erasme.org/pl-sql-library-for-JSON?lang=en
|
||||
|
||||
|
||||
|
||||
@ -3,3 +3,9 @@
|
||||
select *
|
||||
from table(date_util_pkg.explode_month(2011, 2))
|
||||
|
||||
-- generate a table of dates based on a "calendar string"
|
||||
-- for calendar string syntax, see http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_sched.htm#i1009923
|
||||
-- a start and stop date can be specified, it not specified it defaults to a year from now
|
||||
|
||||
select t.column_value
|
||||
from table(date_util_pkg.get_date_tab('FREQ=WEEKLY; BYDAY=MON,WED,FRI', trunc(sysdate), trunc(sysdate+90))) t
|
||||
40
demos/sms_util_pkg_demo.sql
Normal file
40
demos/sms_util_pkg_demo.sql
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
-- send sms (text message) via gateway
|
||||
-- the configuration must be adapted to a specific gateway api
|
||||
-- for example, see http://www.smsglobal.com/http-api/
|
||||
|
||||
-- sign up with a gateway provider to obtain a username and password
|
||||
|
||||
/*
|
||||
|
||||
-- the following tags can be used in the url template
|
||||
|
||||
#username#
|
||||
#password#
|
||||
#message#
|
||||
#to#
|
||||
#from#
|
||||
#attr1#
|
||||
#attr2#
|
||||
#attr3#
|
||||
|
||||
*/
|
||||
|
||||
declare
|
||||
l_config sms_util_pkg.t_gateway_config;
|
||||
begin
|
||||
-- configure gateway
|
||||
-- remember you may have to open this hostname in the database Network ACL
|
||||
l_config.send_sms_url := 'http://www.smsglobal.com/http-api.php?action=sendsms&user=#username#r&password=#password#&from=#from#&to=#to#&
|
||||
text=#message#';
|
||||
l_config.username := 'testuser';
|
||||
l_config.password := 'secret';
|
||||
l_config.response_format := sms_util_pkg.g_format_custom;
|
||||
l_config.response_error_parser := 'my_package.my_error_parser'; -- this is a function that accepts a clob and returns a varchar2
|
||||
sms_util_pkg.set_gateway_config (l_config);
|
||||
-- if using HTTPS you need to set up an Oracle wallet with the certificate
|
||||
-- sms_util_pkg.set_wallet (p_wallet_path => '/path/to/wallet/', p_wallet_password => 'somesecret');
|
||||
-- send the message
|
||||
sms_util_pkg.sends_sms (p_message => 'Hello SMS World', p_to => 123456789, p_from => 'BobSacamano');
|
||||
end;
|
||||
/
|
||||
@ -1,4 +1,11 @@
|
||||
|
||||
Version 1.7.1
|
||||
=============
|
||||
|
||||
- Added sms_util_pkg
|
||||
- Minor enhancements to date_util_pkg
|
||||
- Minor enhancements to string_util_pkg
|
||||
|
||||
Version 1.7.0
|
||||
=============
|
||||
- Split installation script into various modules (core, xml, amazon, microsoft, etc.)
|
||||
|
||||
41
doc/coding_standards.txt
Normal file
41
doc/coding_standards.txt
Normal file
@ -0,0 +1,41 @@
|
||||
Coding Standards
|
||||
for the
|
||||
Alexandria PL/SQL Utility Library
|
||||
=================================
|
||||
|
||||
Please follow the following coding conventions if you want to contribute to the library.
|
||||
The best way to write compliant code is to familiarize yourself with the existing code and try to adapt a similar style.
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
* Files should use Windows line endings. Any decent editor will understand both Windows and Unix line endings, but by sticking to Windows line endings the files can be viewed without problems even in "dumb" editors such as Notepad.
|
||||
* Make sure your Git client is set to "checkout as-is, commit as-is" with respect to line endings. See https://help.github.com/articles/dealing-with-line-endings/ and http://stackoverflow.com/questions/10418975/how-to-change-line-ending-settings for more information.
|
||||
|
||||
Case
|
||||
----
|
||||
* All identifiers, built-in functions, packages and other code should be written in lowercase.
|
||||
* Use underscores between words.
|
||||
* CORRECT: get_invoice_totals
|
||||
* WRONG: GET_INVOICE_TOTALS
|
||||
* WRONG: getInvoiceTotals
|
||||
|
||||
Indentation
|
||||
-----------
|
||||
* Identation size is 2 spaces
|
||||
* Do not use tabs, always use spaces
|
||||
|
||||
Naming Conventions
|
||||
------------------
|
||||
* All packages should be postfixed with _pkg
|
||||
* All parameters should be prefixed with p_
|
||||
* All local variables should be prefixed with l_
|
||||
* All private "module"-level (ie package body-level) variables should be prefixed with m_
|
||||
* All public "global" (ie package specification-level) variables should be prefixed with g_
|
||||
* All public "global" (ie package specification-level) constants should be prefixed with c_ (note: this is not done consistently in existing code, where constants are commonly prefixed with g_ instead, but new code should use the c_ prefix)
|
||||
|
||||
Other
|
||||
-----
|
||||
* All program units (functions and procedures) must have a standard comment block that explains the purpose of the program unit, as well as a change log that includes the author's initials (max 3 characters), date (using format DD.MM.YYYY) and a description of the change
|
||||
* All functions must define a local variable called "l_returnvalue" and the last statement in any function should be "return l_returnvalue;". Do not write functions with multiple return statements, and do not write procedures with any return statements.
|
||||
* Always include (repeat) the name of the program unit in the final "end" statement at the end of the program unit.
|
||||
@ -11,44 +11,44 @@ as
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 09.01.2011 Created
|
||||
|
||||
|
||||
*/
|
||||
|
||||
g_aws_id varchar2(20) := 'my_aws_id'; -- AWS access key ID
|
||||
g_aws_key varchar2(40) := 'my_aws_key'; -- AWS secret key
|
||||
|
||||
g_gmt_offset number := 0; -- your timezone GMT adjustment
|
||||
g_gmt_offset number := NULL; -- your timezone GMT adjustment
|
||||
|
||||
|
||||
function get_auth_string (p_string in varchar2) return varchar2
|
||||
as
|
||||
l_returnvalue varchar2(32000);
|
||||
l_encrypted_raw raw (2000); -- stores encrypted binary text
|
||||
l_decrypted_raw raw (2000); -- stores decrypted binary text
|
||||
l_key_bytes_raw raw (64); -- stores 256-bit encryption key
|
||||
l_encrypted_raw raw (2000); -- stores encrypted binary text
|
||||
l_decrypted_raw raw (2000); -- stores decrypted binary text
|
||||
l_key_bytes_raw raw (64); -- stores 256-bit encryption key
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: get authentication string
|
||||
Purpose: get authentication string
|
||||
|
||||
Remarks: see http://docs.amazonwebservices.com/AmazonS3/latest/dev/RESTAuthentication.html#ConstructingTheAuthenticationHeader
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 09.01.2011 Created
|
||||
|
||||
|
||||
*/
|
||||
|
||||
l_key_bytes_raw := utl_i18n.string_to_raw (g_aws_key, 'AL32UTF8');
|
||||
l_decrypted_raw := utl_i18n.string_to_raw (p_string, 'AL32UTF8');
|
||||
|
||||
l_key_bytes_raw := utl_i18n.string_to_raw (g_aws_key, 'AL32UTF8');
|
||||
l_decrypted_raw := utl_i18n.string_to_raw (p_string, 'AL32UTF8');
|
||||
|
||||
l_encrypted_raw := dbms_crypto.mac (src => l_decrypted_raw, typ => dbms_crypto.hmac_sh1, key => l_key_bytes_raw);
|
||||
|
||||
l_returnvalue := utl_i18n.raw_to_char (utl_encode.base64_encode(l_encrypted_raw), 'AL32UTF8');
|
||||
|
||||
|
||||
l_returnvalue := utl_i18n.raw_to_char (utl_encode.base64_encode(l_encrypted_raw), 'AL32UTF8');
|
||||
|
||||
l_returnvalue := 'AWS ' || g_aws_id || ':' || l_returnvalue;
|
||||
|
||||
|
||||
return l_returnvalue;
|
||||
|
||||
end get_auth_string;
|
||||
@ -56,22 +56,22 @@ end get_auth_string;
|
||||
|
||||
function get_signature (p_string in varchar2) return varchar2
|
||||
as
|
||||
|
||||
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: get signature part of authentication string
|
||||
|
||||
Remarks:
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 09.01.2011 Created
|
||||
|
||||
|
||||
*/
|
||||
|
||||
return substr(get_auth_string(p_string),26);
|
||||
|
||||
return substr(get_auth_string(p_string),26);
|
||||
|
||||
end get_signature;
|
||||
|
||||
@ -84,12 +84,12 @@ begin
|
||||
|
||||
Purpose: get AWS access key ID
|
||||
|
||||
Remarks:
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 09.01.2011 Created
|
||||
|
||||
|
||||
*/
|
||||
|
||||
return g_aws_id;
|
||||
@ -100,21 +100,29 @@ end get_aws_id;
|
||||
function get_date_string (p_date in date := sysdate) return varchar2
|
||||
as
|
||||
l_returnvalue varchar2(255);
|
||||
l_date_as_time timestamp(6);
|
||||
l_time_utc timestamp(6);
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: get AWS access key ID
|
||||
|
||||
Remarks:
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 09.01.2011 Created
|
||||
|
||||
|
||||
*/
|
||||
|
||||
l_returnvalue := to_char(p_date + g_gmt_offset/24, 'Dy, DD Mon YYYY HH24:MI:SS', 'NLS_DATE_LANGUAGE = AMERICAN') || ' GMT';
|
||||
|
||||
if g_gmt_offset is null then
|
||||
l_date_as_time := cast(p_date as timestamp);
|
||||
l_time_utc := sys_extract_utc(l_date_as_time);
|
||||
l_returnvalue := to_char(l_time_utc, 'Dy, DD Mon YYYY HH24:MI:SS', 'NLS_DATE_LANGUAGE = AMERICAN') || ' GMT';
|
||||
else
|
||||
l_returnvalue := to_char(p_date + g_gmt_offset/24, 'Dy, DD Mon YYYY HH24:MI:SS', 'NLS_DATE_LANGUAGE = AMERICAN') || ' GMT';
|
||||
end if;
|
||||
|
||||
return l_returnvalue;
|
||||
|
||||
@ -130,12 +138,12 @@ begin
|
||||
|
||||
Purpose: get epoch (number of seconds since January 1, 1970)
|
||||
|
||||
Remarks:
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 09.01.2011 Created
|
||||
|
||||
|
||||
*/
|
||||
|
||||
l_returnvalue := trunc((p_date - to_date('01-01-1970','MM-DD-YYYY')) * 24 * 60 * 60);
|
||||
@ -153,19 +161,19 @@ begin
|
||||
|
||||
Purpose: set AWS access key id
|
||||
|
||||
Remarks:
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 18.01.2011 Created
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
g_aws_id := p_aws_id;
|
||||
|
||||
|
||||
end set_aws_id;
|
||||
|
||||
|
||||
|
||||
procedure set_aws_key (p_aws_key in varchar2)
|
||||
as
|
||||
@ -175,12 +183,12 @@ begin
|
||||
|
||||
Purpose: set AWS secret key
|
||||
|
||||
Remarks:
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 18.01.2011 Created
|
||||
|
||||
|
||||
*/
|
||||
|
||||
g_aws_key := p_aws_key;
|
||||
@ -196,14 +204,14 @@ begin
|
||||
|
||||
Purpose: set GMT offset
|
||||
|
||||
Remarks:
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 03.03.2011 Created
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
g_gmt_offset := p_gmt_offset;
|
||||
|
||||
end set_gmt_offset;
|
||||
@ -211,7 +219,7 @@ end set_gmt_offset;
|
||||
|
||||
procedure init (p_aws_id in varchar2,
|
||||
p_aws_key in varchar2,
|
||||
p_gmt_offset in number)
|
||||
p_gmt_offset in number := NULL)
|
||||
as
|
||||
begin
|
||||
|
||||
@ -219,20 +227,19 @@ begin
|
||||
|
||||
Purpose: initialize package for use
|
||||
|
||||
Remarks:
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 03.03.2011 Created
|
||||
|
||||
|
||||
*/
|
||||
|
||||
g_aws_id := p_aws_id;
|
||||
g_aws_key := p_aws_key;
|
||||
g_gmt_offset := nvl(p_gmt_offset, g_gmt_offset);
|
||||
g_gmt_offset := p_gmt_offset;
|
||||
|
||||
end init;
|
||||
|
||||
end amazon_aws_auth_pkg;
|
||||
/
|
||||
|
||||
|
||||
@ -7,15 +7,15 @@ as
|
||||
|
||||
Remarks: inspired by the whitepaper "Building an Amazon S3 Client with Application Express 4.0" by Jason Straub
|
||||
see http://jastraub.blogspot.com/2011/01/building-amazon-s3-client-with.html
|
||||
|
||||
dependencies: owner of this package needs execute on dbms_crypto
|
||||
|
||||
dependencies: owner of this package needs execute on dbms_crypto
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 09.01.2011 Created
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
-- get "Authorization" (actually authentication) header string
|
||||
function get_auth_string (p_string in varchar2) return varchar2;
|
||||
|
||||
@ -24,16 +24,16 @@ as
|
||||
|
||||
-- get AWS access key ID
|
||||
function get_aws_id return varchar2;
|
||||
|
||||
|
||||
-- get date string
|
||||
function get_date_string (p_date in date := sysdate) return varchar2;
|
||||
|
||||
|
||||
-- get epoch (number of seconds since January 1, 1970)
|
||||
function get_epoch (p_date in date) return number;
|
||||
|
||||
|
||||
-- set AWS access key id
|
||||
procedure set_aws_id (p_aws_id in varchar2);
|
||||
|
||||
|
||||
-- set AWS secret key
|
||||
procedure set_aws_key (p_aws_key in varchar2);
|
||||
|
||||
@ -43,8 +43,7 @@ as
|
||||
-- initialize package for use
|
||||
procedure init (p_aws_id in varchar2,
|
||||
p_aws_key in varchar2,
|
||||
p_gmt_offset in number := null);
|
||||
p_gmt_offset in number := NULL);
|
||||
|
||||
end amazon_aws_auth_pkg;
|
||||
/
|
||||
|
||||
|
||||
@ -221,6 +221,7 @@ function clob_to_csv (p_csv_clob in clob,
|
||||
p_separator in varchar2 := g_default_separator,
|
||||
p_skip_rows in number := 0) return t_csv_tab pipelined
|
||||
as
|
||||
l_csv_clob clob;
|
||||
l_line_separator varchar2(2) := chr(13) || chr(10);
|
||||
l_last pls_integer;
|
||||
l_current pls_integer;
|
||||
@ -243,7 +244,7 @@ begin
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 31.03.2010 Created
|
||||
|
||||
JLL 20.04.2015 Modified made an internal clob because || l_line_separator is very bad for performance
|
||||
*/
|
||||
|
||||
-- If the file has a DOS newline (cr+lf), use that
|
||||
@ -253,17 +254,18 @@ begin
|
||||
end if;
|
||||
|
||||
l_last := 1;
|
||||
l_csv_clob := p_csv_clob || l_line_separator;
|
||||
|
||||
loop
|
||||
|
||||
l_current := dbms_lob.instr (p_csv_clob || l_line_separator, l_line_separator, l_last, 1);
|
||||
l_current := dbms_lob.instr (l_csv_clob , l_line_separator, l_last, 1);
|
||||
exit when (nvl(l_current,0) = 0);
|
||||
|
||||
l_line_number := l_line_number + 1;
|
||||
|
||||
if l_from_line <= l_line_number then
|
||||
|
||||
l_line := dbms_lob.substr(p_csv_clob || l_line_separator, l_current - l_last + 1, l_last);
|
||||
l_line := dbms_lob.substr(l_csv_clob, l_current - l_last + 1, l_last);
|
||||
--l_line := replace(l_line, l_line_separator, '');
|
||||
l_line := replace(l_line, chr(10), '');
|
||||
l_line := replace(l_line, chr(13), '');
|
||||
|
||||
@ -122,6 +122,8 @@ begin
|
||||
if p_table_data_only then
|
||||
dbms_datapump.metadata_filter (l_job_handle, 'INCLUDE_PATH_LIST', '''TABLE'''); -- note the double quotes
|
||||
-- TODO: investigate the "TABLE_EXISTS_ACTION" parameter
|
||||
-- not sure what the context was for the TODO, but we use it to clear down tables before importing data.
|
||||
-- Usage is dbms_datapump.set_parameter(l_job_handle, 'TABLE_EXISTS_ACTION', 'TRUNCATE');
|
||||
end if;
|
||||
|
||||
dbms_datapump.start_job (l_job_handle);
|
||||
|
||||
@ -628,5 +628,51 @@ begin
|
||||
end explode_month;
|
||||
|
||||
|
||||
function get_date_tab (p_calendar_string in varchar2,
|
||||
p_from_date in date := null,
|
||||
p_to_date in date := null) return t_date_array pipelined
|
||||
as
|
||||
l_from_date date := coalesce(p_from_date, sysdate);
|
||||
l_to_date date := coalesce(p_to_date, add_months(l_from_date,12));
|
||||
l_date_after date;
|
||||
l_next_date date;
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: get table of dates based on specified calendar string
|
||||
|
||||
Remarks: see https://oraclesponge.wordpress.com/2010/08/18/generating-lists-of-dates-in-oracle-the-dbms_scheduler-way/
|
||||
see http://www.kibeha.dk/2014/12/date-row-generator-with-dbmsscheduler.html
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 24.09.2015 Created
|
||||
|
||||
*/
|
||||
|
||||
l_date_after := l_from_date - 1;
|
||||
|
||||
loop
|
||||
|
||||
dbms_scheduler.evaluate_calendar_string (
|
||||
calendar_string => p_calendar_string,
|
||||
start_date => l_from_date,
|
||||
return_date_after => l_date_after,
|
||||
next_run_date => l_next_date
|
||||
);
|
||||
|
||||
exit when l_next_date > l_to_date;
|
||||
|
||||
pipe row (l_next_date);
|
||||
|
||||
l_date_after := l_next_date;
|
||||
|
||||
end loop;
|
||||
|
||||
return;
|
||||
|
||||
end get_date_tab;
|
||||
|
||||
end date_util_pkg;
|
||||
/
|
||||
|
||||
@ -103,5 +103,10 @@ as
|
||||
function explode_month (p_year in number,
|
||||
p_month in number) return t_period_date_tab pipelined;
|
||||
|
||||
-- get table of dates based on specified calendar string
|
||||
function get_date_tab (p_calendar_string in varchar2,
|
||||
p_from_date in date := null,
|
||||
p_to_date in date := null) return t_date_array pipelined;
|
||||
|
||||
end date_util_pkg;
|
||||
/
|
||||
|
||||
@ -1,5 +1,13 @@
|
||||
create or replace package body ntlm_http_pkg
|
||||
as
|
||||
c_blob constant number(1) := 0;
|
||||
c_clob constant number(1) := 1;
|
||||
|
||||
type t_response_body is record (
|
||||
l_blob blob,
|
||||
l_clob clob,
|
||||
l_blob_or_clob number(1) default 1
|
||||
);
|
||||
|
||||
/*
|
||||
|
||||
@ -51,17 +59,60 @@ begin
|
||||
end headers_contain_value;
|
||||
|
||||
|
||||
function get_response_clob (p_url in varchar2,
|
||||
p_username in varchar2,
|
||||
p_password in varchar2,
|
||||
p_wallet_path in varchar2 := null,
|
||||
p_wallet_password in varchar2 := null,
|
||||
p_proxy_server in varchar2 := null) return clob
|
||||
procedure get_response_body (p_resp in out utl_http.resp, p_response_body in out nocopy t_response_body)
|
||||
as
|
||||
l_bdata raw(32767);
|
||||
l_cdata string_util_pkg.t_max_pl_varchar2;
|
||||
begin
|
||||
/*
|
||||
|
||||
Purpose: get the response body as a blob
|
||||
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 24.06.2011 Created
|
||||
EAO 22.03.2015 Works with BLOBs
|
||||
|
||||
*/
|
||||
|
||||
if p_response_body.l_blob_or_clob = c_blob then
|
||||
begin
|
||||
loop
|
||||
utl_http.read_raw(r => p_resp, data => l_bdata);
|
||||
dbms_lob.append( p_response_body.l_blob, to_blob( l_bdata ));
|
||||
end loop;
|
||||
exception
|
||||
when utl_http.end_of_body then
|
||||
null;
|
||||
end;
|
||||
else
|
||||
begin
|
||||
loop
|
||||
utl_http.read_text(r => p_resp, data => l_cdata);
|
||||
p_response_body.l_clob := p_response_body.l_clob || l_cdata;
|
||||
end loop;
|
||||
exception
|
||||
when utl_http.end_of_body then
|
||||
null;
|
||||
end;
|
||||
end if;
|
||||
end get_response_body;
|
||||
|
||||
|
||||
procedure get_response (p_url in varchar2,
|
||||
p_username in varchar2,
|
||||
p_password in varchar2,
|
||||
p_wallet_path in varchar2 := null,
|
||||
p_wallet_password in varchar2 := null,
|
||||
p_proxy_server in varchar2 := null,
|
||||
p_response_body in out nocopy t_response_body)
|
||||
as
|
||||
|
||||
l_req utl_http.req;
|
||||
l_resp utl_http.resp;
|
||||
l_returnvalue clob;
|
||||
l_returnvalue blob;
|
||||
|
||||
l_authenticate_with_ntlm boolean;
|
||||
|
||||
@ -76,41 +127,7 @@ as
|
||||
l_negotiate_flags raw(4000);
|
||||
|
||||
l_authenticate_message varchar2(500);
|
||||
|
||||
|
||||
function get_response_body (p_resp in out utl_http.resp) return clob
|
||||
as
|
||||
l_data string_util_pkg.t_max_pl_varchar2;
|
||||
l_returnvalue clob;
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: get the response body as a clob
|
||||
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 24.06.2011 Created
|
||||
|
||||
*/
|
||||
|
||||
begin
|
||||
loop
|
||||
utl_http.read_text(r => p_resp, data => l_data);
|
||||
l_returnvalue := l_returnvalue || l_data;
|
||||
end loop;
|
||||
exception
|
||||
when utl_http.end_of_body then
|
||||
null;
|
||||
end;
|
||||
|
||||
return l_returnvalue;
|
||||
|
||||
end get_response_body;
|
||||
|
||||
|
||||
|
||||
procedure debug_response (p_resp in out utl_http.resp)
|
||||
as
|
||||
l_name varchar2(255);
|
||||
@ -118,18 +135,6 @@ as
|
||||
l_body clob;
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: print debug info about the response
|
||||
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 24.06.2011 Created
|
||||
|
||||
*/
|
||||
|
||||
debug_pkg.printf('Response Status Code: %1', p_resp.status_code);
|
||||
|
||||
for i in 1 .. utl_http.get_header_count (p_resp) loop
|
||||
@ -137,7 +142,7 @@ as
|
||||
debug_pkg.printf('#%1 %2 : %3', i, l_name, l_value);
|
||||
end loop;
|
||||
|
||||
l_returnvalue := get_response_body (p_resp);
|
||||
get_response_body (p_resp, p_response_body);
|
||||
|
||||
debug_pkg.printf('Body length = %1', dbms_lob.getlength (l_returnvalue));
|
||||
debug_pkg.printf('Persistent connection count: %1', utl_http.get_persistent_conn_count);
|
||||
@ -146,7 +151,6 @@ as
|
||||
|
||||
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: Get response clob from URL
|
||||
@ -268,9 +272,72 @@ begin
|
||||
utl_http.close_persistent_conns;
|
||||
debug_pkg.printf('Persistent connection count (should be zero): %1', utl_http.get_persistent_conn_count);
|
||||
|
||||
return l_returnvalue;
|
||||
|
||||
end get_response;
|
||||
|
||||
|
||||
function get_response_blob (p_url in varchar2,
|
||||
p_username in varchar2,
|
||||
p_password in varchar2,
|
||||
p_wallet_path in varchar2 := null,
|
||||
p_wallet_password in varchar2 := null,
|
||||
p_proxy_server in varchar2 := null) return blob
|
||||
as
|
||||
l_response_body t_response_body;
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: Get response clob from URL
|
||||
|
||||
Remarks: see http://davenport.sourceforge.net/ntlm.html#ntlmHttpAuthentication
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
FDL 11.05.2011 Created
|
||||
MBR 03.06.2011 Lots of changes
|
||||
EAO 22.03.2015 Most functionality moved to get_response
|
||||
|
||||
*/
|
||||
|
||||
dbms_lob.createtemporary( l_response_body.l_blob, true);
|
||||
l_response_body.l_blob_or_clob := c_blob;
|
||||
get_response(
|
||||
p_url => get_response_blob.p_url,
|
||||
p_username => get_response_blob.p_username,
|
||||
p_password => get_response_blob.p_password,
|
||||
p_wallet_path => get_response_blob.p_wallet_path,
|
||||
p_wallet_password => get_response_blob.p_wallet_password,
|
||||
p_proxy_server => get_response_blob.p_proxy_server,
|
||||
p_response_body => l_response_body);
|
||||
|
||||
return l_response_body.l_blob;
|
||||
|
||||
end get_response_blob;
|
||||
|
||||
|
||||
function get_response_clob (p_url in varchar2,
|
||||
p_username in varchar2,
|
||||
p_password in varchar2,
|
||||
p_wallet_path in varchar2 := null,
|
||||
p_wallet_password in varchar2 := null,
|
||||
p_proxy_server in varchar2 := null) return clob
|
||||
as
|
||||
l_response_body t_response_body;
|
||||
begin
|
||||
dbms_lob.createtemporary( l_response_body.l_clob, true);
|
||||
l_response_body.l_blob_or_clob := c_clob;
|
||||
|
||||
get_response(
|
||||
p_url => get_response_clob.p_url,
|
||||
p_username => get_response_clob.p_username,
|
||||
p_password => get_response_clob.p_password,
|
||||
p_wallet_path => get_response_clob.p_wallet_path,
|
||||
p_wallet_password => get_response_clob.p_wallet_password,
|
||||
p_proxy_server => get_response_clob.p_proxy_server,
|
||||
p_response_body => l_response_body);
|
||||
|
||||
return l_response_body.l_clob;
|
||||
|
||||
end get_response_clob;
|
||||
|
||||
|
||||
@ -473,4 +540,3 @@ end end_request;
|
||||
|
||||
end ntlm_http_pkg;
|
||||
/
|
||||
|
||||
|
||||
@ -17,6 +17,14 @@ as
|
||||
|
||||
*/
|
||||
|
||||
-- get blob from url
|
||||
function get_response_blob (p_url in varchar2,
|
||||
p_username in varchar2,
|
||||
p_password in varchar2,
|
||||
p_wallet_path in varchar2 := null,
|
||||
p_wallet_password in varchar2 := null,
|
||||
p_proxy_server in varchar2 := null) return blob;
|
||||
|
||||
-- get clob from url
|
||||
function get_response_clob (p_url in varchar2,
|
||||
p_username in varchar2,
|
||||
@ -39,4 +47,3 @@ as
|
||||
|
||||
end ntlm_http_pkg;
|
||||
/
|
||||
|
||||
|
||||
@ -401,7 +401,7 @@ begin
|
||||
if l_type = 's' then
|
||||
l_string_index := to_number (l_returnvalue);
|
||||
l_xml := get_xml (p_xlsx, 'xl/sharedStrings.xml');
|
||||
l_returnvalue := xml_util_pkg.extract_value (l_xml, '/sst/si[' || (l_string_index + 1) || ']/t/text()', g_namespace_xlsx_sharedstrings);
|
||||
l_returnvalue := xml_util_pkg.extract_value (l_xml, '/sst/si[' || (l_string_index + 1) || ']//t/text()', g_namespace_xlsx_sharedstrings);
|
||||
end if;
|
||||
|
||||
return l_returnvalue;
|
||||
@ -453,7 +453,7 @@ begin
|
||||
|
||||
if l_type = 's' then
|
||||
l_string_index := to_number (l_returnvalue(i));
|
||||
l_returnvalue(i) := xml_util_pkg.extract_value (l_shared_strings, '/sst/si[' || (l_string_index + 1) || ']/t/text()', g_namespace_xlsx_sharedstrings);
|
||||
l_returnvalue(i) := xml_util_pkg.extract_value (l_shared_strings, '/sst/si[' || (l_string_index + 1) || ']//t/text()', g_namespace_xlsx_sharedstrings);
|
||||
end if;
|
||||
|
||||
end loop;
|
||||
|
||||
@ -39,7 +39,7 @@ begin
|
||||
*/
|
||||
|
||||
if p_format = g_format_rss then
|
||||
l_returnvalue := to_char(p_date, g_date_format_rss);
|
||||
l_returnvalue := to_char(p_date, g_date_format_rss,'NLS_DATE_LANGUAGE = ENGLISH');
|
||||
elsif p_format = g_format_rdf then
|
||||
l_returnvalue := to_char(p_date, g_date_format_rdf);
|
||||
elsif p_format = g_format_atom then
|
||||
@ -75,7 +75,7 @@ begin
|
||||
begin
|
||||
if p_format = g_format_rss then
|
||||
--l_returnvalue := to_date(p_date_str, g_date_format_rss);
|
||||
l_returnvalue := to_date(substr(p_date_str,1,26), 'Dy, DD Mon YYYY HH24:MI:SS');
|
||||
l_returnvalue := to_date(substr(p_date_str,1,26), 'Dy, DD Mon YYYY HH24:MI:SS','NLS_DATE_LANGUAGE = ENGLISH');
|
||||
elsif p_format = g_format_rdf then
|
||||
--l_returnvalue := to_date(p_date_str, g_date_format_rdf);
|
||||
l_returnvalue := to_date(substr(p_date_str,1,19), 'YYYY-MM-DD"T"HH24:MI:SS');
|
||||
|
||||
209
ora/sms_util_pkg.pkb
Normal file
209
ora/sms_util_pkg.pkb
Normal file
@ -0,0 +1,209 @@
|
||||
create or replace package body sms_util_pkg
|
||||
as
|
||||
|
||||
/*
|
||||
|
||||
Purpose: Package handles sending of SMS (Short Message Service) to mobile phones via an SMS gateway
|
||||
|
||||
Remarks: The package provides a generic interface and attempts to support "any" SMS gateway that provides an HTTP(S) (GET) interface
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 24.08.2014 Created
|
||||
|
||||
*/
|
||||
|
||||
g_gateway_config t_gateway_config;
|
||||
|
||||
g_wallet_path string_util_pkg.t_max_db_varchar2;
|
||||
g_wallet_password string_util_pkg.t_max_db_varchar2;
|
||||
|
||||
|
||||
function make_request (p_url in varchar2,
|
||||
p_body in clob := null,
|
||||
p_http_method in varchar2 := 'POST',
|
||||
p_username in varchar2 := null,
|
||||
p_password in varchar2 := null) return clob
|
||||
as
|
||||
l_returnvalue clob;
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: make HTTP request
|
||||
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 23.08.2014 Created
|
||||
|
||||
*/
|
||||
|
||||
debug_pkg.printf('%1 %2', p_http_method, p_url);
|
||||
|
||||
l_returnvalue := apex_web_service.make_rest_request(
|
||||
p_url => p_url,
|
||||
p_http_method => p_http_method,
|
||||
p_body => p_body,
|
||||
p_username => p_username,
|
||||
p_password => p_password,
|
||||
p_wallet_path => g_wallet_path,
|
||||
p_wallet_pwd => g_wallet_password
|
||||
);
|
||||
|
||||
return l_returnvalue;
|
||||
|
||||
end make_request;
|
||||
|
||||
|
||||
procedure check_response_for_errors (p_response in clob)
|
||||
as
|
||||
l_xml xmltype;
|
||||
l_error_message string_util_pkg.t_max_pl_varchar2;
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: check response for errors
|
||||
|
||||
Remarks: error handling is different for every SMS gateway (API provider)
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 24.08.2014 Created
|
||||
|
||||
*/
|
||||
|
||||
debug_pkg.printf('response length = %1', length(p_response));
|
||||
debug_pkg.printf('first 32K characters of response = %1', substr(p_response,1,32000));
|
||||
|
||||
if g_gateway_config.response_format = g_format_xml then
|
||||
|
||||
begin
|
||||
l_xml := xmltype (p_response);
|
||||
debug_pkg.printf('response converted to valid XML');
|
||||
if l_xml.existsnode (g_gateway_config.response_error_path) = 1 then
|
||||
debug_pkg.printf('error path node found, attempting to retrieve it');
|
||||
l_error_message := l_xml.extract(g_gateway_config.response_error_path, g_gateway_config.response_error_namespace).getstringval();
|
||||
else
|
||||
debug_pkg.printf('error path node not found, assuming no errors');
|
||||
end if;
|
||||
exception
|
||||
when others then
|
||||
l_error_message := sqlerrm;
|
||||
end;
|
||||
|
||||
elsif g_gateway_config.response_format = g_format_custom then
|
||||
|
||||
-- parse errors from response based on custom PL/SQL parsing function specified by the user
|
||||
-- this function should take a single clob parameter (the response from the SMS gateway) and return a varchar2 if an error is found in the response
|
||||
execute immediate 'begin sms_util_pkg.g_exec_result_string := ' || dbms_assert.sql_object_name(g_gateway_config.response_error_parser) || ' (:b1); end;' using p_response;
|
||||
l_error_message := g_exec_result_string;
|
||||
|
||||
else
|
||||
-- TODO: implement JSON parsing using APEX_JSON (if Apex 5+ is installed)
|
||||
raise_application_error (-20000, 'Response format ' || g_gateway_config.response_format || ' not supported or not implemented!');
|
||||
end if;
|
||||
|
||||
if l_error_message is not null then
|
||||
raise_application_error (-20000, 'The SMS gateway returned an error: ' || l_error_message, true);
|
||||
end if;
|
||||
|
||||
end check_response_for_errors;
|
||||
|
||||
|
||||
procedure set_wallet (p_wallet_path in varchar2,
|
||||
p_wallet_password in varchar2)
|
||||
as
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: set SSL wallet properties
|
||||
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 23.08.2014 Created
|
||||
|
||||
*/
|
||||
|
||||
g_wallet_path := p_wallet_path;
|
||||
g_wallet_password := p_wallet_password;
|
||||
|
||||
end set_wallet;
|
||||
|
||||
|
||||
procedure set_gateway_config (p_gateway_config in t_gateway_config)
|
||||
as
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: set gateway configuration
|
||||
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 23.08.2014 Created
|
||||
|
||||
*/
|
||||
|
||||
g_gateway_config := p_gateway_config;
|
||||
|
||||
end set_gateway_config;
|
||||
|
||||
|
||||
procedure send_sms (p_message in varchar2,
|
||||
p_to in varchar2,
|
||||
p_from in varchar2,
|
||||
p_attr1 in varchar2 := null,
|
||||
p_attr2 in varchar2 := null,
|
||||
p_attr3 in varchar2 := null,
|
||||
p_username in varchar2 := null,
|
||||
p_password in varchar2 := null)
|
||||
as
|
||||
l_url string_util_pkg.t_max_pl_varchar2;
|
||||
l_response clob;
|
||||
|
||||
function url_escape (p_text in varchar2) return varchar2
|
||||
as
|
||||
begin
|
||||
return utl_url.escape (p_text, escape_reserved_chars => false, url_charset => 'UTF8');
|
||||
end url_escape;
|
||||
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: send SMS message
|
||||
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 24.08.2014 Created
|
||||
|
||||
*/
|
||||
|
||||
-- TODO: assert that configuration exists
|
||||
|
||||
l_url := string_util_pkg.multi_replace (
|
||||
g_gateway_config.send_sms_url,
|
||||
t_str_array('#username#', '#password#', '#message#', '#to#', '#from#', '#attr1#', '#attr2#', '#attr3#'),
|
||||
t_str_array(coalesce(p_username, g_gateway_config.username), coalesce(p_password, g_gateway_config.password), url_escape(p_message), url_escape(p_to), url_escape(p_from), p_attr1, p_attr2, p_attr3)
|
||||
);
|
||||
|
||||
l_response := make_request (p_url => l_url, p_http_method => 'GET');
|
||||
|
||||
check_response_for_errors (l_response);
|
||||
|
||||
end send_sms;
|
||||
|
||||
|
||||
end sms_util_pkg;
|
||||
/
|
||||
|
||||
54
ora/sms_util_pkg.pks
Normal file
54
ora/sms_util_pkg.pks
Normal file
@ -0,0 +1,54 @@
|
||||
create or replace package sms_util_pkg
|
||||
as
|
||||
|
||||
/*
|
||||
|
||||
Purpose: Package handles sending of SMS (Short Message Service) to mobile phones via an SMS gateway
|
||||
|
||||
Remarks: The package provides a generic interface and attempts to support any SMS gateway that provides an HTTP(S) (GET) interface
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 24.08.2014 Created
|
||||
|
||||
*/
|
||||
|
||||
-- gateway configuration
|
||||
type t_gateway_config is record (
|
||||
send_sms_url varchar2(4000),
|
||||
username varchar2(255),
|
||||
password varchar2(255),
|
||||
response_format varchar2(30),
|
||||
response_error_path varchar2(4000), -- either an xpath or jsonpath expression
|
||||
response_error_namespace varchar2(4000), -- xml namespace
|
||||
response_error_parser varchar2(4000) -- a custom PL/SQL error parsing function (must accept a clob parameter and return a varchar2 containing error message)
|
||||
);
|
||||
|
||||
-- response formats
|
||||
g_format_xml constant varchar2(255) := 'xml';
|
||||
g_format_json constant varchar2(255) := 'json';
|
||||
g_format_custom constant varchar2(255) := 'custom';
|
||||
|
||||
-- internal variable used for dynamic PL/SQL evaluation
|
||||
g_exec_result_string varchar2(4000);
|
||||
|
||||
-- set SSL wallet properties
|
||||
procedure set_wallet (p_wallet_path in varchar2,
|
||||
p_wallet_password in varchar2);
|
||||
|
||||
-- set gateway configuration
|
||||
procedure set_gateway_config (p_gateway_config in t_gateway_config);
|
||||
|
||||
-- send SMS message
|
||||
procedure send_sms (p_message in varchar2,
|
||||
p_to in varchar2,
|
||||
p_from in varchar2,
|
||||
p_attr1 in varchar2 := null,
|
||||
p_attr2 in varchar2 := null,
|
||||
p_attr3 in varchar2 := null,
|
||||
p_username in varchar2 := null,
|
||||
p_password in varchar2 := null);
|
||||
|
||||
end sms_util_pkg;
|
||||
/
|
||||
|
||||
@ -98,6 +98,33 @@ begin
|
||||
end get_str;
|
||||
|
||||
|
||||
procedure add_token (p_text in out varchar2,
|
||||
p_token in varchar2,
|
||||
p_separator in varchar2 := g_default_separator)
|
||||
as
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: add token to string
|
||||
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 30.10.2015 Created
|
||||
|
||||
*/
|
||||
|
||||
if p_text is null then
|
||||
p_text := p_token;
|
||||
else
|
||||
p_text := p_text || p_separator || p_token;
|
||||
end if;
|
||||
|
||||
end add_token;
|
||||
|
||||
|
||||
function get_nth_token(p_text in varchar2,
|
||||
p_num in number,
|
||||
p_separator in varchar2 := g_default_separator) return varchar2
|
||||
@ -345,7 +372,6 @@ as
|
||||
l_temp_str t_max_pl_varchar2;
|
||||
l_begin_pos pls_integer;
|
||||
l_end_pos pls_integer;
|
||||
|
||||
begin
|
||||
|
||||
|
||||
@ -359,33 +385,38 @@ begin
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 16.05.2007 Created
|
||||
MBR 24.09.2015 If parameter name not specified (null), then return null
|
||||
|
||||
*/
|
||||
|
||||
-- get the starting position of the param name
|
||||
l_begin_pos:=instr(p_param_string, p_param_name || p_value_separator);
|
||||
if p_param_name is not null then
|
||||
|
||||
if l_begin_pos = 0 then
|
||||
l_returnvalue:=null;
|
||||
else
|
||||
-- get the starting position of the param name
|
||||
l_begin_pos:=instr(p_param_string, p_param_name || p_value_separator);
|
||||
|
||||
-- trim off characters before param value begins, including param name
|
||||
l_temp_str:=substr(p_param_string, l_begin_pos, length(p_param_string) - l_begin_pos + 1);
|
||||
l_temp_str:=del_str(l_temp_str, 1, length(p_param_name || p_value_separator));
|
||||
|
||||
-- now find the first next occurence of the character delimiting the params
|
||||
-- if delimiter not found, return the rest of the string
|
||||
|
||||
l_end_pos:=instr(l_temp_str, p_param_separator);
|
||||
if l_end_pos = 0 then
|
||||
l_end_pos:=length(l_temp_str);
|
||||
if l_begin_pos = 0 then
|
||||
l_returnvalue:=null;
|
||||
else
|
||||
-- strip off delimiter
|
||||
l_end_pos:=l_end_pos - 1;
|
||||
end if;
|
||||
|
||||
-- retrieve the value
|
||||
l_returnvalue:=copy_str(l_temp_str, 1, l_end_pos);
|
||||
-- trim off characters before param value begins, including param name
|
||||
l_temp_str:=substr(p_param_string, l_begin_pos, length(p_param_string) - l_begin_pos + 1);
|
||||
l_temp_str:=del_str(l_temp_str, 1, length(p_param_name || p_value_separator));
|
||||
|
||||
-- now find the first next occurence of the character delimiting the params
|
||||
-- if delimiter not found, return the rest of the string
|
||||
|
||||
l_end_pos:=instr(l_temp_str, p_param_separator);
|
||||
if l_end_pos = 0 then
|
||||
l_end_pos:=length(l_temp_str);
|
||||
else
|
||||
-- strip off delimiter
|
||||
l_end_pos:=l_end_pos - 1;
|
||||
end if;
|
||||
|
||||
-- retrieve the value
|
||||
l_returnvalue:=copy_str(l_temp_str, 1, l_end_pos);
|
||||
|
||||
end if;
|
||||
|
||||
end if;
|
||||
|
||||
@ -487,6 +518,50 @@ begin
|
||||
end remove_non_alpha_chars;
|
||||
|
||||
|
||||
function is_str_alpha (p_str in varchar2) return boolean
|
||||
as
|
||||
l_returnvalue boolean;
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: returns true if string only contains alpha characters
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MJH 12.05.2015 Created
|
||||
|
||||
*/
|
||||
|
||||
l_returnvalue := regexp_instr(p_str, '[^a-z|A-Z]') = 0;
|
||||
|
||||
return l_returnvalue;
|
||||
|
||||
end is_str_alpha;
|
||||
|
||||
|
||||
function is_str_alphanumeric (p_str in varchar2) return boolean
|
||||
as
|
||||
l_returnvalue boolean;
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: returns true if string is alphanumeric
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MJH 12.05.2015 Created
|
||||
|
||||
*/
|
||||
|
||||
l_returnvalue := regexp_instr(p_str, '[^a-z|A-Z|0-9]') = 0;
|
||||
|
||||
return l_returnvalue;
|
||||
|
||||
end is_str_alphanumeric;
|
||||
|
||||
|
||||
function is_str_empty (p_str in varchar2) return boolean
|
||||
as
|
||||
l_returnvalue boolean;
|
||||
@ -557,6 +632,28 @@ begin
|
||||
end is_str_number;
|
||||
|
||||
|
||||
function is_str_integer (p_str in varchar2) return boolean
|
||||
as
|
||||
l_returnvalue boolean;
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: returns true if string is an integer
|
||||
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MJH 12.05.2015 Created
|
||||
|
||||
*/
|
||||
|
||||
l_returnvalue := regexp_instr(p_str, '[^0-9]') = 0;
|
||||
|
||||
return l_returnvalue;
|
||||
|
||||
end is_str_integer;
|
||||
|
||||
|
||||
function short_str (p_str in varchar2,
|
||||
p_length in number,
|
||||
p_truncation_indicator in varchar2 := '...') return varchar2
|
||||
@ -694,10 +791,11 @@ begin
|
||||
Who Date Description
|
||||
------ ---------- -------------------------------------
|
||||
MBR 06.01.2009 Created
|
||||
MJH 12.05.2015 Leverage string_util_pkg.str_to_bool in order to reduce code redundancy
|
||||
|
||||
*/
|
||||
|
||||
if lower(p_str) in ('y', 'yes', 'true', '1') then
|
||||
if str_to_bool(p_str) then
|
||||
l_returnvalue := g_yes;
|
||||
end if;
|
||||
|
||||
@ -1012,6 +1110,41 @@ begin
|
||||
end value_has_changed;
|
||||
|
||||
|
||||
function concat_array (p_array in t_str_array,
|
||||
p_separator in varchar2 := g_default_separator) return varchar2
|
||||
as
|
||||
l_returnvalue t_max_pl_varchar2;
|
||||
begin
|
||||
|
||||
/*
|
||||
|
||||
Purpose: concatenate non-null strings with specified separator
|
||||
|
||||
Remarks:
|
||||
|
||||
Who Date Description
|
||||
------ ---------- --------------------------------
|
||||
MBR 19.11.2015 Created
|
||||
|
||||
*/
|
||||
|
||||
if p_array.count > 0 then
|
||||
for i in 1 .. p_array.count loop
|
||||
if p_array(i) is not null then
|
||||
if l_returnvalue is null then
|
||||
l_returnvalue := p_array(i);
|
||||
else
|
||||
l_returnvalue := l_returnvalue || p_separator || p_array(i);
|
||||
end if;
|
||||
end if;
|
||||
end loop;
|
||||
end if;
|
||||
|
||||
return l_returnvalue;
|
||||
|
||||
end concat_array;
|
||||
|
||||
|
||||
end string_util_pkg;
|
||||
/
|
||||
|
||||
|
||||
@ -34,8 +34,8 @@ as
|
||||
g_tab constant varchar2(1) := chr(9);
|
||||
g_ampersand constant varchar2(1) := chr(38);
|
||||
|
||||
g_html_entity_carriage_return constant varchar2(5) := ' ';
|
||||
g_html_nbsp constant varchar2(6) := ' ';
|
||||
g_html_entity_carriage_return constant varchar2(5) := chr(38) || '#13;';
|
||||
g_html_nbsp constant varchar2(6) := chr(38) || 'nbsp;';
|
||||
|
||||
-- return string merged with substitution values
|
||||
function get_str (p_msg in varchar2,
|
||||
@ -48,6 +48,11 @@ as
|
||||
p_value7 in varchar2 := null,
|
||||
p_value8 in varchar2 := null) return varchar2;
|
||||
|
||||
-- add token to string
|
||||
procedure add_token (p_text in out varchar2,
|
||||
p_token in varchar2,
|
||||
p_separator in varchar2 := g_default_separator);
|
||||
|
||||
-- get the sub-string at the Nth position
|
||||
function get_nth_token(p_text in varchar2,
|
||||
p_num in number,
|
||||
@ -92,6 +97,12 @@ as
|
||||
-- remove all non-alpha characters (A-Z) from string
|
||||
function remove_non_alpha_chars (p_str in varchar2) return varchar2;
|
||||
|
||||
-- returns true if string only contains alpha characters
|
||||
function is_str_alpha (p_str in varchar2) return boolean;
|
||||
|
||||
-- returns true if string is alphanumeric
|
||||
function is_str_alphanumeric (p_str in varchar2) return boolean;
|
||||
|
||||
-- returns true if string is "empty" (contains only whitespace characters)
|
||||
function is_str_empty (p_str in varchar2) return boolean;
|
||||
|
||||
@ -100,6 +111,9 @@ as
|
||||
p_decimal_separator in varchar2 := null,
|
||||
p_thousand_separator in varchar2 := null) return boolean;
|
||||
|
||||
-- returns true if string is an integer
|
||||
function is_str_integer (p_str in varchar2) return boolean;
|
||||
|
||||
-- returns substring and indicates if string has been truncated
|
||||
function short_str (p_str in varchar2,
|
||||
p_length in number,
|
||||
@ -150,7 +164,6 @@ as
|
||||
p_list in varchar2,
|
||||
p_separator in varchar2 := g_default_separator) return boolean;
|
||||
|
||||
|
||||
-- randomize array
|
||||
function randomize_array (p_array in t_str_array) return t_str_array;
|
||||
|
||||
@ -158,6 +171,9 @@ as
|
||||
function value_has_changed (p_old in varchar2,
|
||||
p_new in varchar2) return boolean;
|
||||
|
||||
-- concatenate non-null strings with specified separator
|
||||
function concat_array (p_array in t_str_array,
|
||||
p_separator in varchar2 := g_default_separator) return varchar2;
|
||||
|
||||
end string_util_pkg;
|
||||
/
|
||||
|
||||
@ -548,6 +548,19 @@ as
|
||||
end if;
|
||||
return 's="' || t_XfId || '"';
|
||||
end;
|
||||
--
|
||||
function clean_string (p_string in varchar2)
|
||||
return varchar2
|
||||
is
|
||||
invalid_ascii constant varchar2(32) :=
|
||||
chr(00)||chr(01)||chr(02)||chr(03)||chr(04)||chr(05)||chr(06)||chr(07)||
|
||||
chr(08)|| chr(11)||chr(12)|| chr(14)||chr(15)||
|
||||
chr(16)||chr(17)||chr(18)||chr(19)||chr(20)||chr(21)||chr(22)||chr(23)||
|
||||
chr(24)||chr(25)||chr(26)||chr(27)||chr(28)||chr(29)||chr(30)||chr(31)
|
||||
;
|
||||
begin
|
||||
return translate(translate( p_string, invalid_ascii, chr(1)), chr(0)||chr(1), ' ');
|
||||
end;
|
||||
--
|
||||
procedure cell
|
||||
( p_col pls_integer
|
||||
@ -584,7 +597,7 @@ as
|
||||
t_alignment tp_alignment := p_alignment;
|
||||
begin
|
||||
workbook.sheets( t_sheet ).rows( p_row )( p_col ).value := workbook.strings.count();
|
||||
workbook.strings( workbook.strings.count() ) := p_value;
|
||||
workbook.strings( workbook.strings.count() ) := clean_string( p_value );
|
||||
if t_alignment.wrapText is null and instr( p_value, chr(13) ) > 0
|
||||
then
|
||||
t_alignment.wrapText := true;
|
||||
@ -633,7 +646,7 @@ as
|
||||
t_sheet pls_integer := nvl( p_sheet, workbook.sheets.count() );
|
||||
begin
|
||||
workbook.sheets( t_sheet ).rows( p_row )( p_col ).value := workbook.strings.count();
|
||||
workbook.strings( workbook.strings.count() ) := nvl( p_value, p_url );
|
||||
workbook.strings( workbook.strings.count() ) := clean_string( nvl( p_value, p_url ) );
|
||||
workbook.sheets( t_sheet ).rows( p_row )( p_col ).style := 't="s" ' || get_XfId( t_sheet, p_col, p_row, '', get_font( 'Calibri', p_theme => 10, p_underline => true ) );
|
||||
t_ind := workbook.sheets( t_sheet ).hyperlinks.count() + 1;
|
||||
workbook.sheets( t_sheet ).hyperlinks( t_ind ).cell := alfan_col( p_col ) || p_row;
|
||||
|
||||
@ -7,103 +7,105 @@ prompt Creating types
|
||||
|
||||
prompt Creating package specifications
|
||||
|
||||
@..\ora\amazon_aws_auth_pkg.pks
|
||||
@..\ora\amazon_aws_s3_pkg.pks
|
||||
@..\ora\apex_util_pkg.pks
|
||||
@..\ora\crypto_util_pkg.pks
|
||||
@..\ora\csv_util_pkg.pks
|
||||
@..\ora\datapump_util_pkg.pks
|
||||
@..\ora\date_util_pkg.pks
|
||||
@..\ora\debug_pkg.pks
|
||||
@..\ora\encode_util_pkg.pks
|
||||
@..\ora\file_util_pkg.pks
|
||||
@..\ora\flex_ws_api.pks
|
||||
@..\ora\ftp_util_pkg.pks
|
||||
@..\ora\gis_util_pkg.pks
|
||||
@..\ora\google_maps_pkg.pks
|
||||
@..\ora\google_maps_js_pkg.pks
|
||||
@..\ora\google_translate_pkg.pks
|
||||
@..\ora\html_util_pkg.pks
|
||||
@..\ora\http_util_pkg.pks
|
||||
@..\ora\icalendar_util_pkg.pks
|
||||
@..\ora\image_util_pkg.pks
|
||||
@..\ora\json_util_pkg.pks
|
||||
@..\ora\math_util_pkg.pks
|
||||
@..\ora\ms_ews_util_pkg.pks
|
||||
@..\ora\ntlm_util_pkg.pks
|
||||
@..\ora\ntlm_http_pkg.pks
|
||||
@..\ora\ooxml_util_pkg.pks
|
||||
@..\ora\owa_util_pkg.pks
|
||||
@..\ora\pdf_builder_pkg.pks
|
||||
@..\ora\random_util_pkg.pks
|
||||
@..\ora\raw_util_pkg.pks
|
||||
@..\ora\regexp_util_pkg.pks
|
||||
@..\ora\rss_util_pkg.pks
|
||||
@..\ora\soap_server_pkg.pks
|
||||
@..\ora\sql_builder_pkg.pks
|
||||
@..\ora\sql_util_pkg.pks
|
||||
@..\ora\string_util_pkg.pks
|
||||
@..\ora\sylk_util_pkg.pks
|
||||
@..\ora\t_soap_envelope.pks
|
||||
@..\ora\uri_template_util_pkg.pks
|
||||
@..\ora\validation_util_pkg.pks
|
||||
@..\ora\web_util_pkg.pks
|
||||
@..\ora\xlsx_builder_pkg.pks
|
||||
@..\ora\xml_builder_pkg.pks
|
||||
@..\ora\xml_dataset_pkg.pks
|
||||
@..\ora\xml_stylesheet_pkg.pks
|
||||
@..\ora\xml_util_pkg.pks
|
||||
@..\ora\zip_util_pkg.pks
|
||||
@../ora/amazon_aws_auth_pkg.pks
|
||||
@../ora/amazon_aws_s3_pkg.pks
|
||||
@../ora/apex_util_pkg.pks
|
||||
@../ora/crypto_util_pkg.pks
|
||||
@../ora/csv_util_pkg.pks
|
||||
@../ora/datapump_util_pkg.pks
|
||||
@../ora/date_util_pkg.pks
|
||||
@../ora/debug_pkg.pks
|
||||
@../ora/encode_util_pkg.pks
|
||||
@../ora/file_util_pkg.pks
|
||||
@../ora/flex_ws_api.pks
|
||||
@../ora/ftp_util_pkg.pks
|
||||
@../ora/gis_util_pkg.pks
|
||||
@../ora/google_maps_pkg.pks
|
||||
@../ora/google_maps_js_pkg.pks
|
||||
@../ora/google_translate_pkg.pks
|
||||
@../ora/html_util_pkg.pks
|
||||
@../ora/http_util_pkg.pks
|
||||
@../ora/icalendar_util_pkg.pks
|
||||
@../ora/image_util_pkg.pks
|
||||
@../ora/json_util_pkg.pks
|
||||
@../ora/math_util_pkg.pks
|
||||
@../ora/ms_ews_util_pkg.pks
|
||||
@../ora/ntlm_util_pkg.pks
|
||||
@../ora/ntlm_http_pkg.pks
|
||||
@../ora/ooxml_util_pkg.pks
|
||||
@../ora/owa_util_pkg.pks
|
||||
@../ora/pdf_builder_pkg.pks
|
||||
@../ora/random_util_pkg.pks
|
||||
@../ora/raw_util_pkg.pks
|
||||
@../ora/regexp_util_pkg.pks
|
||||
@../ora/rss_util_pkg.pks
|
||||
@../ora/sms_util_pkg.pks
|
||||
@../ora/soap_server_pkg.pks
|
||||
@../ora/sql_builder_pkg.pks
|
||||
@../ora/sql_util_pkg.pks
|
||||
@../ora/string_util_pkg.pks
|
||||
@../ora/sylk_util_pkg.pks
|
||||
@../ora/t_soap_envelope.pks
|
||||
@../ora/uri_template_util_pkg.pks
|
||||
@../ora/validation_util_pkg.pks
|
||||
@../ora/web_util_pkg.pks
|
||||
@../ora/xlsx_builder_pkg.pks
|
||||
@../ora/xml_builder_pkg.pks
|
||||
@../ora/xml_dataset_pkg.pks
|
||||
@../ora/xml_stylesheet_pkg.pks
|
||||
@../ora/xml_util_pkg.pks
|
||||
@../ora/zip_util_pkg.pks
|
||||
|
||||
prompt Creating package bodies
|
||||
|
||||
@..\ora\amazon_aws_auth_pkg.pkb
|
||||
@..\ora\amazon_aws_s3_pkg.pkb
|
||||
@..\ora\apex_util_pkg.pkb
|
||||
@..\ora\crypto_util_pkg.pkb
|
||||
@..\ora\csv_util_pkg.pkb
|
||||
@..\ora\datapump_util_pkg.pkb
|
||||
@..\ora\date_util_pkg.pkb
|
||||
@..\ora\debug_pkg.pkb
|
||||
@..\ora\encode_util_pkg.pkb
|
||||
@..\ora\file_util_pkg.pkb
|
||||
@..\ora\flex_ws_api.pkb
|
||||
@..\ora\ftp_util_pkg.pkb
|
||||
@..\ora\gis_util_pkg.pkb
|
||||
@..\ora\google_maps_pkg.pkb
|
||||
@..\ora\google_maps_js_pkg.pkb
|
||||
@..\ora\google_translate_pkg.pkb
|
||||
@..\ora\html_util_pkg.pkb
|
||||
@..\ora\http_util_pkg.pkb
|
||||
@..\ora\icalendar_util_pkg.pkb
|
||||
@..\ora\image_util_pkg.pkb
|
||||
@..\ora\json_util_pkg.pkb
|
||||
@..\ora\math_util_pkg.pkb
|
||||
@..\ora\ms_ews_util_pkg.pkb
|
||||
@..\ora\ntlm_util_pkg.pkb
|
||||
@..\ora\ntlm_http_pkg.pkb
|
||||
@..\ora\ooxml_util_pkg.pkb
|
||||
@..\ora\owa_util_pkg.pkb
|
||||
@..\ora\pdf_builder_pkg.pkb
|
||||
@..\ora\random_util_pkg.pkb
|
||||
@..\ora\raw_util_pkg.pkb
|
||||
@..\ora\regexp_util_pkg.pkb
|
||||
@..\ora\rss_util_pkg.pkb
|
||||
@..\ora\soap_server_pkg.pkb
|
||||
@..\ora\sql_builder_pkg.pkb
|
||||
@..\ora\sql_util_pkg.pkb
|
||||
@..\ora\string_util_pkg.pkb
|
||||
@..\ora\sylk_util_pkg.pkb
|
||||
@..\ora\t_soap_envelope.pkb
|
||||
@..\ora\uri_template_util_pkg.pkb
|
||||
@..\ora\validation_util_pkg.pkb
|
||||
@..\ora\web_util_pkg.pkb
|
||||
@..\ora\xlsx_builder_pkg.pkb
|
||||
@..\ora\xml_builder_pkg.pkb
|
||||
@..\ora\xml_dataset_pkg.pkb
|
||||
@..\ora\xml_stylesheet_pkg.pkb
|
||||
@..\ora\xml_util_pkg.pkb
|
||||
@..\ora\zip_util_pkg.pkb
|
||||
@../ora/amazon_aws_auth_pkg.pkb
|
||||
@../ora/amazon_aws_s3_pkg.pkb
|
||||
@../ora/apex_util_pkg.pkb
|
||||
@../ora/crypto_util_pkg.pkb
|
||||
@../ora/csv_util_pkg.pkb
|
||||
@../ora/datapump_util_pkg.pkb
|
||||
@../ora/date_util_pkg.pkb
|
||||
@../ora/debug_pkg.pkb
|
||||
@../ora/encode_util_pkg.pkb
|
||||
@../ora/file_util_pkg.pkb
|
||||
@../ora/flex_ws_api.pkb
|
||||
@../ora/ftp_util_pkg.pkb
|
||||
@../ora/gis_util_pkg.pkb
|
||||
@../ora/google_maps_pkg.pkb
|
||||
@../ora/google_maps_js_pkg.pkb
|
||||
@../ora/google_translate_pkg.pkb
|
||||
@../ora/html_util_pkg.pkb
|
||||
@../ora/http_util_pkg.pkb
|
||||
@../ora/icalendar_util_pkg.pkb
|
||||
@../ora/image_util_pkg.pkb
|
||||
@../ora/json_util_pkg.pkb
|
||||
@../ora/math_util_pkg.pkb
|
||||
@../ora/ms_ews_util_pkg.pkb
|
||||
@../ora/ntlm_util_pkg.pkb
|
||||
@../ora/ntlm_http_pkg.pkb
|
||||
@../ora/ooxml_util_pkg.pkb
|
||||
@../ora/owa_util_pkg.pkb
|
||||
@../ora/pdf_builder_pkg.pkb
|
||||
@../ora/random_util_pkg.pkb
|
||||
@../ora/raw_util_pkg.pkb
|
||||
@../ora/regexp_util_pkg.pkb
|
||||
@../ora/rss_util_pkg.pkb
|
||||
@../ora/sms_util_pkg.pkb
|
||||
@../ora/soap_server_pkg.pkb
|
||||
@../ora/sql_builder_pkg.pkb
|
||||
@../ora/sql_util_pkg.pkb
|
||||
@../ora/string_util_pkg.pkb
|
||||
@../ora/sylk_util_pkg.pkb
|
||||
@../ora/t_soap_envelope.pkb
|
||||
@../ora/uri_template_util_pkg.pkb
|
||||
@../ora/validation_util_pkg.pkb
|
||||
@../ora/web_util_pkg.pkb
|
||||
@../ora/xlsx_builder_pkg.pkb
|
||||
@../ora/xml_builder_pkg.pkb
|
||||
@../ora/xml_dataset_pkg.pkb
|
||||
@../ora/xml_stylesheet_pkg.pkb
|
||||
@../ora/xml_util_pkg.pkb
|
||||
@../ora/zip_util_pkg.pkb
|
||||
|
||||
|
||||
prompt Done!
|
||||
|
||||
@ -4,13 +4,13 @@ set scan off;
|
||||
|
||||
prompt Creating AMAZON package specifications
|
||||
|
||||
@..\ora\amazon_aws_auth_pkg.pks
|
||||
@..\ora\amazon_aws_s3_pkg.pks
|
||||
@../ora/amazon_aws_auth_pkg.pks
|
||||
@../ora/amazon_aws_s3_pkg.pks
|
||||
|
||||
prompt Creating AMAZON package bodies
|
||||
|
||||
@..\ora\amazon_aws_auth_pkg.pkb
|
||||
@..\ora\amazon_aws_s3_pkg.pkb
|
||||
@../ora/amazon_aws_auth_pkg.pkb
|
||||
@../ora/amazon_aws_s3_pkg.pkb
|
||||
|
||||
|
||||
prompt Done!
|
||||
|
||||
@ -7,35 +7,35 @@ prompt Creating CORE types
|
||||
|
||||
prompt Creating CORE package specifications
|
||||
|
||||
@..\ora\crypto_util_pkg.pks
|
||||
@..\ora\date_util_pkg.pks
|
||||
@..\ora\debug_pkg.pks
|
||||
@..\ora\encode_util_pkg.pks
|
||||
@..\ora\file_util_pkg.pks
|
||||
@..\ora\math_util_pkg.pks
|
||||
@..\ora\random_util_pkg.pks
|
||||
@..\ora\raw_util_pkg.pks
|
||||
@..\ora\regexp_util_pkg.pks
|
||||
@..\ora\sql_util_pkg.pks
|
||||
@..\ora\string_util_pkg.pks
|
||||
@..\ora\xml_util_pkg.pks
|
||||
@..\ora\zip_util_pkg.pks
|
||||
@../ora/crypto_util_pkg.pks
|
||||
@../ora/date_util_pkg.pks
|
||||
@../ora/debug_pkg.pks
|
||||
@../ora/encode_util_pkg.pks
|
||||
@../ora/file_util_pkg.pks
|
||||
@../ora/math_util_pkg.pks
|
||||
@../ora/random_util_pkg.pks
|
||||
@../ora/raw_util_pkg.pks
|
||||
@../ora/regexp_util_pkg.pks
|
||||
@../ora/sql_util_pkg.pks
|
||||
@../ora/string_util_pkg.pks
|
||||
@../ora/xml_util_pkg.pks
|
||||
@../ora/zip_util_pkg.pks
|
||||
|
||||
prompt Creating CORE package bodies
|
||||
|
||||
@..\ora\crypto_util_pkg.pkb
|
||||
@..\ora\date_util_pkg.pkb
|
||||
@..\ora\debug_pkg.pkb
|
||||
@..\ora\encode_util_pkg.pkb
|
||||
@..\ora\file_util_pkg.pkb
|
||||
@..\ora\math_util_pkg.pkb
|
||||
@..\ora\random_util_pkg.pkb
|
||||
@..\ora\raw_util_pkg.pkb
|
||||
@..\ora\regexp_util_pkg.pkb
|
||||
@..\ora\sql_util_pkg.pkb
|
||||
@..\ora\string_util_pkg.pkb
|
||||
@..\ora\xml_util_pkg.pkb
|
||||
@..\ora\zip_util_pkg.pkb
|
||||
@../ora/crypto_util_pkg.pkb
|
||||
@../ora/date_util_pkg.pkb
|
||||
@../ora/debug_pkg.pkb
|
||||
@../ora/encode_util_pkg.pkb
|
||||
@../ora/file_util_pkg.pkb
|
||||
@../ora/math_util_pkg.pkb
|
||||
@../ora/random_util_pkg.pkb
|
||||
@../ora/raw_util_pkg.pkb
|
||||
@../ora/regexp_util_pkg.pkb
|
||||
@../ora/sql_util_pkg.pkb
|
||||
@../ora/string_util_pkg.pkb
|
||||
@../ora/xml_util_pkg.pkb
|
||||
@../ora/zip_util_pkg.pkb
|
||||
|
||||
|
||||
prompt Done!
|
||||
|
||||
@ -4,15 +4,15 @@ set scan off;
|
||||
|
||||
prompt Creating GOOGLE package specifications
|
||||
|
||||
@..\ora\google_maps_pkg.pks
|
||||
@..\ora\google_maps_js_pkg.pks
|
||||
@..\ora\google_translate_pkg.pks
|
||||
@../ora/google_maps_pkg.pks
|
||||
@../ora/google_maps_js_pkg.pks
|
||||
@../ora/google_translate_pkg.pks
|
||||
|
||||
prompt Creating GOOGLE package bodies
|
||||
|
||||
@..\ora\google_maps_pkg.pkb
|
||||
@..\ora\google_maps_js_pkg.pkb
|
||||
@..\ora\google_translate_pkg.pkb
|
||||
@../ora/google_maps_pkg.pkb
|
||||
@../ora/google_maps_js_pkg.pkb
|
||||
@../ora/google_translate_pkg.pkb
|
||||
|
||||
|
||||
prompt Done!
|
||||
|
||||
@ -3,27 +3,27 @@ set scan off;
|
||||
|
||||
prompt Creating INET package specifications
|
||||
|
||||
@..\ora\flex_ws_api.pks
|
||||
@..\ora\ftp_util_pkg.pks
|
||||
@..\ora\html_util_pkg.pks
|
||||
@..\ora\http_util_pkg.pks
|
||||
@..\ora\icalendar_util_pkg.pks
|
||||
@..\ora\json_util_pkg.pks
|
||||
@..\ora\rss_util_pkg.pks
|
||||
@..\ora\t_soap_envelope.pks
|
||||
@..\ora\web_util_pkg.pks
|
||||
@../ora/flex_ws_api.pks
|
||||
@../ora/ftp_util_pkg.pks
|
||||
@../ora/html_util_pkg.pks
|
||||
@../ora/http_util_pkg.pks
|
||||
@../ora/icalendar_util_pkg.pks
|
||||
@../ora/json_util_pkg.pks
|
||||
@../ora/rss_util_pkg.pks
|
||||
@../ora/t_soap_envelope.pks
|
||||
@../ora/web_util_pkg.pks
|
||||
|
||||
prompt Creating INET package bodies
|
||||
|
||||
@..\ora\flex_ws_api.pkb
|
||||
@..\ora\ftp_util_pkg.pkb
|
||||
@..\ora\html_util_pkg.pkb
|
||||
@..\ora\http_util_pkg.pkb
|
||||
@..\ora\icalendar_util_pkg.pkb
|
||||
@..\ora\json_util_pkg.pkb
|
||||
@..\ora\rss_util_pkg.pkb
|
||||
@..\ora\t_soap_envelope.pkb
|
||||
@..\ora\web_util_pkg.pkb
|
||||
@../ora/flex_ws_api.pkb
|
||||
@../ora/ftp_util_pkg.pkb
|
||||
@../ora/html_util_pkg.pkb
|
||||
@../ora/http_util_pkg.pkb
|
||||
@../ora/icalendar_util_pkg.pkb
|
||||
@../ora/json_util_pkg.pkb
|
||||
@../ora/rss_util_pkg.pkb
|
||||
@../ora/t_soap_envelope.pkb
|
||||
@../ora/web_util_pkg.pkb
|
||||
|
||||
|
||||
prompt Done!
|
||||
|
||||
@ -3,21 +3,21 @@ set scan off;
|
||||
|
||||
prompt Creating MICROSOFT package specifications
|
||||
|
||||
@..\ora\ms_ews_util_pkg.pks
|
||||
@..\ora\ntlm_util_pkg.pks
|
||||
@..\ora\ntlm_http_pkg.pks
|
||||
@..\ora\ooxml_util_pkg.pks
|
||||
@..\ora\xlsx_builder_pkg.pks
|
||||
@..\ora\xml_stylesheet_pkg.pks
|
||||
@../ora/ms_ews_util_pkg.pks
|
||||
@../ora/ntlm_util_pkg.pks
|
||||
@../ora/ntlm_http_pkg.pks
|
||||
@../ora/ooxml_util_pkg.pks
|
||||
@../ora/xlsx_builder_pkg.pks
|
||||
@../ora/xml_stylesheet_pkg.pks
|
||||
|
||||
prompt Creating MICROSOFT package bodies
|
||||
|
||||
@..\ora\ms_ews_util_pkg.pkb
|
||||
@..\ora\ntlm_util_pkg.pkb
|
||||
@..\ora\ntlm_http_pkg.pkb
|
||||
@..\ora\ooxml_util_pkg.pkb
|
||||
@..\ora\xlsx_builder_pkg.pkb
|
||||
@..\ora\xml_stylesheet_pkg.pkb
|
||||
@../ora/ms_ews_util_pkg.pkb
|
||||
@../ora/ntlm_util_pkg.pkb
|
||||
@../ora/ntlm_http_pkg.pkb
|
||||
@../ora/ooxml_util_pkg.pkb
|
||||
@../ora/xlsx_builder_pkg.pkb
|
||||
@../ora/xml_stylesheet_pkg.pkb
|
||||
|
||||
prompt Done!
|
||||
|
||||
|
||||
@ -4,13 +4,13 @@ set scan off;
|
||||
|
||||
prompt Creating ORACLE APEX and OWA utility package specifications
|
||||
|
||||
@..\ora\apex_util_pkg.pks
|
||||
@..\ora\owa_util_pkg.pks
|
||||
@../ora/apex_util_pkg.pks
|
||||
@../ora/owa_util_pkg.pks
|
||||
|
||||
prompt Creating ORACLE APEX and OWA utility package bodies
|
||||
|
||||
@..\ora\apex_util_pkg.pkb
|
||||
@..\ora\owa_util_pkg.pkb
|
||||
@../ora/apex_util_pkg.pkb
|
||||
@../ora/owa_util_pkg.pkb
|
||||
|
||||
|
||||
prompt Done!
|
||||
|
||||
@ -4,15 +4,15 @@ set scan off;
|
||||
|
||||
prompt Creating XML package specifications
|
||||
|
||||
@..\ora\xml_builder_pkg.pks
|
||||
@..\ora\xml_dataset_pkg.pks
|
||||
@..\ora\xml_stylesheet_pkg.pks
|
||||
@../ora/xml_builder_pkg.pks
|
||||
@../ora/xml_dataset_pkg.pks
|
||||
@../ora/xml_stylesheet_pkg.pks
|
||||
|
||||
prompt Creating XML package bodies
|
||||
|
||||
@..\ora\xml_builder_pkg.pkb
|
||||
@..\ora\xml_dataset_pkg.pkb
|
||||
@..\ora\xml_stylesheet_pkg.pkb
|
||||
@../ora/xml_builder_pkg.pkb
|
||||
@../ora/xml_dataset_pkg.pkb
|
||||
@../ora/xml_stylesheet_pkg.pkb
|
||||
|
||||
|
||||
prompt Done!
|
||||
|
||||
@ -35,6 +35,7 @@ create synonym ax_random for random_util_pkg;
|
||||
create synonym ax_raw for raw_util_pkg;
|
||||
create synonym ax_regexp for regexp_util_pkg;
|
||||
create synonym ax_rss for rss_util_pkg;
|
||||
create synonym ax_sms for sms_util_pkg;
|
||||
create synonym ax_sql_builder for sql_builder_pkg;
|
||||
create synonym ax_sql for sql_util_pkg;
|
||||
create synonym ax_string for string_util_pkg;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user