added comments for set_file_association function
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3257 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -21,8 +21,20 @@ PROCEDURE export_table_to_csv(p_table IN VARCHAR2,
|
|||||||
end MIP_FILES;
|
end MIP_FILES;
|
||||||
/
|
/
|
||||||
create or replace package body MIP_FILES as
|
create or replace package body MIP_FILES as
|
||||||
|
/*
|
||||||
function set_file_association(p_uri in varchar2,
|
FUNCTION set_file_association
|
||||||
|
- sets the association between a object within webmip to a file held in the
|
||||||
|
- APEX application files view.
|
||||||
|
%param p_uri - the uri of the file (the contents of the name column in APEX application files)
|
||||||
|
%param p_description - description of the file, will be set in documents and document_roles table
|
||||||
|
%param p_docu_type - INDO (held within webmip db), EXDO (held outside webmip), FIDO (on file system)
|
||||||
|
%param p_rt_code - type of role for docment eg 'ENQUIRY SUPPORTING DOC' see role types table
|
||||||
|
%param p_qute_id - the quote id if applicable otherwise supply null
|
||||||
|
%param p_enqu_id - the enquiry id if applicable otherwise supply null
|
||||||
|
%param p_drwg_code - the drawing code if applicable otherwise supply null
|
||||||
|
%param p_doro_type - DRRO (for a drawing), ENDO (for an enquiry), QUDO (for a quote)
|
||||||
|
*/
|
||||||
|
function set_file_association(p_uri in varchar2,
|
||||||
p_description in varchar2,
|
p_description in varchar2,
|
||||||
p_docu_type in varchar2,
|
p_docu_type in varchar2,
|
||||||
p_rt_code in varchar2,
|
p_rt_code in varchar2,
|
||||||
@@ -32,7 +44,7 @@ function set_file_association(p_uri in varchar2,
|
|||||||
p_doro_type in varchar2) return boolean is
|
p_doro_type in varchar2) return boolean is
|
||||||
l_doc_id number;
|
l_doc_id number;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
--reference it in the documents table
|
--reference it in the documents table
|
||||||
insert into documents( uri, description, id, docu_type )
|
insert into documents( uri, description, id, docu_type )
|
||||||
values (p_uri,
|
values (p_uri,
|
||||||
@@ -53,7 +65,7 @@ begin
|
|||||||
l_doc_id);
|
l_doc_id);
|
||||||
--if it works then return true
|
--if it works then return true
|
||||||
return true;
|
return true;
|
||||||
end set_file_association;
|
end set_file_association;
|
||||||
/*
|
/*
|
||||||
PROCEDURE export_data_to_csv
|
PROCEDURE export_data_to_csv
|
||||||
- allows an admin user to create a CSV export of a table in webMIP.
|
- allows an admin user to create a CSV export of a table in webMIP.
|
||||||
@@ -63,7 +75,7 @@ end set_file_association;
|
|||||||
%param p_column_headers - tables column names be exported as a header
|
%param p_column_headers - tables column names be exported as a header
|
||||||
%param p_delimiter - what is the delimiter value is for each field (default ',')
|
%param p_delimiter - what is the delimiter value is for each field (default ',')
|
||||||
*/
|
*/
|
||||||
PROCEDURE export_table_to_csv(p_table IN VARCHAR2,
|
PROCEDURE export_table_to_csv(p_table IN VARCHAR2,
|
||||||
p_column_headers IN VARCHAR2,
|
p_column_headers IN VARCHAR2,
|
||||||
p_delimiter IN VARCHAR2 DEFAULT ',') is
|
p_delimiter IN VARCHAR2 DEFAULT ',') is
|
||||||
|
|
||||||
@@ -73,7 +85,7 @@ PROCEDURE export_table_to_csv(p_table IN VARCHAR2,
|
|||||||
l_return VARCHAR2(4000);
|
l_return VARCHAR2(4000);
|
||||||
l_found BOOLEAN := TRUE;
|
l_found BOOLEAN := TRUE;
|
||||||
l_headers VARCHAR(2000); --used to collect the column headers
|
l_headers VARCHAR(2000); --used to collect the column headers
|
||||||
BEGIN
|
BEGIN
|
||||||
dbms_output.put_line('me is here');
|
dbms_output.put_line('me is here');
|
||||||
-- Build the dynamic SQL statement to get the tables column names
|
-- Build the dynamic SQL statement to get the tables column names
|
||||||
FOR f IN (SELECT column_name
|
FOR f IN (SELECT column_name
|
||||||
@@ -143,7 +155,7 @@ BEGIN
|
|||||||
--
|
--
|
||||||
END LOOP;
|
END LOOP;
|
||||||
--
|
--
|
||||||
END export_table_to_csv;
|
END export_table_to_csv;
|
||||||
|
|
||||||
end MIP_FILES;
|
end MIP_FILES;
|
||||||
/
|
/
|
||||||
|
|||||||
Reference in New Issue
Block a user