Package gp_goksden |
Program units |
f_get_sd_data_types | Returns the SDE Supported attribute datatypes (Not used currently). |
f_get_pk_def | Returns the sql for selecting the concatenated primary key of a a record in a Banner table. |
f_get_view | Returns SDE View script based on template |
f_replace_tags | |
p_copy_attr_md | Copy the design of supplemental data attributes from one table to another. |
p_apply_script | Apply the generated view script to the database. |
f_count_query | Count the number of resulting rows for a query |
f_get_trigger | Returns SDE Trigger script based on template |
Types |
sd_data_type_rec | Supplemental Data Type record type |
sd_data_type_tab_type | Supplemental Data Type record table type |
Constants |
C_VARCHAR2 | Oracle Names for Data Types |
C_DATE | |
C_NUMBER | |
C_CLOB | |
C_SEPSTR | Separate key columns by |
sd_data_type_rec
TYPE sd_data_type_rec IS RECORD ( type_name VARCHAR2(30), type_desc VARCHAR2(50));
Supplemental Data Type record type
sd_data_type_tab_type
TYPE sd_data_type_tab_type IS TABLE OF sd_data_type_rec INDEX BY BINARY_INTEGER;
Supplemental Data Type record table type
C_VARCHAR2
C_VARCHAR2 CONSTANT VARCHAR2(30) := 'VARCHAR2';
Oracle Names for Data Types
C_DATE
C_DATE CONSTANT VARCHAR2(30) := 'DATE';
C_NUMBER
C_NUMBER CONSTANT VARCHAR2(30) := 'NUMBER';
C_CLOB
C_CLOB CONSTANT VARCHAR2(30) := 'CLOB';
C_SEPSTR
C_SEPSTR CONSTANT VARCHAR2(10) := '||CHR(1)||';
Separate key columns by
f_get_sd_data_types
FUNCTION f_get_sd_data_types RETURN sd_data_type_tab_type
Returns the SDE Supported attribute datatypes (Not used currently).
Returns |
SDE Supported attribute datatypes. |
f_get_pk_def
FUNCTION f_get_pk_def(p_owner VARCHAR2, p_table VARCHAR2, p_usercols VARCHAR2 := NULL, p_prefix VARCHAR2 := NULL, p_tochar VARCHAR2 := 'Y', p_sep VARCHAR2 := '||CHR(1)||', p_refresh VARCHAR2 := 'N') RETURN VARCHAR2
Returns the sql for selecting the concatenated primary key of a a record in a Banner table.
Parameters |
p_owner |
Owner of the Banner Table. VARCHAR2(30) Required | |
p_table |
Banner Table Name. VARCHAR2(30) Required | |
p_usercols. |
Comma separated list of columns to use as record identifier when table has no primary key. VARCHAR2 | |
p_prefix. |
Prefix for column name | |
p_tochar. |
Add convert function to normalize key value | |
p_sep. |
Separator | |
p_refresh. |
Do not use stored key definition but generate key from data dictionary. |
Returns |
sql expression to retrieve the key of the Banner record. |
f_get_view
FUNCTION f_get_view(p_template_name VARCHAR2, p_table VARCHAR2) RETURN CLOB
Returns SDE View script based on template
Parameters |
p_template_name |
Name of the template to use. VARCHAR2 | |
p_table |
Table for which the view is to be generated. VARCHAR2 |
Returns |
view script. CLOB |
f_replace_tags
FUNCTION f_replace_tags(p_str CLOB, p_attr g_sde_attr) RETURN CLOB
p_copy_attr_md
PROCEDURE p_copy_attr_md(p_from_table_name VARCHAR2, p_to_owner VARCHAR2, p_to_table_name VARCHAR2, v_message_out OUT VARCHAR2, v_success_out OUT BOOLEAN)
Copy the design of supplemental data attributes from one table to another.
Parameters |
p_from_table_name |
From Banner Table with Supplemental Attributes. VARCHAR2(30) Required | |
p_to_owner |
Owner of To Table. VARCHAR2(30) | |
p_to_table_name |
Table to get the same Supplemental Attributes as the From Table. VARCHAR2(30) Required | |
v_message_out |
Status message to be displayed in the form. VARCHAR2 | |
v_success_out |
Flag for success/failure. Boolean |
p_apply_script
PROCEDURE p_apply_script(p_script VARCHAR2)
Apply the generated view script to the database.
Parameters |
p_script |
VARCHAR2 |
f_count_query
FUNCTION f_count_query(p_query VARCHAR2) RETURN NUMBER
Count the number of resulting rows for a query
Parameters |
p_query |
VARCHAR2 |
Returns |
count of rows. NUMBER |
f_get_trigger
FUNCTION f_get_trigger(p_template_name VARCHAR2, p_table VARCHAR2) RETURN CLOB
Returns SDE Trigger script based on template
Parameters |
p_template_name |
Name of the template to use. VARCHAR2 | |
p_table |
Table for which the trigger is to be generated. VARCHAR2 |
Returns |
trigger script. CLOB |