DBA Data[Home] [Help]

PACKAGE: SYS.DBMS_METADATA_BUILD

Source


1 PACKAGE DBMS_METADATA_BUILD AUTHID CURRENT_USER AS
2 
3 --------------------
4 --  PUBLIC CONSTANTS
5 --
6   DATATYPE_MIN           CONSTANT NUMBER         := 1;
7   DATATYPE_BOOLEAN       CONSTANT NUMBER         := 1;
8   DATATYPE_NUMERIC       CONSTANT NUMBER         := 2;
9   DATATYPE_TEXT          CONSTANT NUMBER         := 3;
10   DATATYPE_CUSTOM_FILTER CONSTANT NUMBER         := 3;
11   DATATYPE_TEXT_EXPR     CONSTANT NUMBER         := 4;
12   DATATYPE_OBJNUM        CONSTANT NUMBER         := 5;
13   DATATYPE_VAT_OBJNUM    CONSTANT NUMBER         := 6;
14   DATATYPE_MAX           CONSTANT NUMBER         := 6;
15 
16   TYPE_HETEROGENEOUS     CONSTANT BOOLEAN        := TRUE;
17   TYPE_HOMOGENEOUS       CONSTANT BOOLEAN        := FALSE;
18   TOP_LEVEL_TYPE         CONSTANT NUMBER         := 0;
19 -------------
20 -- EXCEPTIONS
21 --
22 
23 ---------------------------
24 -- PROCEDURES AND FUNCTIONS
25 --
26 -- DROP_TYPE: Drop a heterogeneous type.  This deletes the type definition
27 --            and all dependent types, filters, etc.
28 -- PARAMETERS
29 --   name                       - type name
30 
31  PROCEDURE drop_type  ( name            IN VARCHAR2 );
32 
33 -- CREATE_TYPE: Begin creation of a type.  The type will not be inserted into
34 -- the dictionary until CLOSE is called.
35 -- PARAMETERS
36 --   parent_handle              - handle of the parent heterogeneous type to
37 --                                which this type belongs.
38 --                                If TOP_LEVEL_TYPE, this is a top-level type
39 --                                (e.g., TABLE_EXPORT)
40 --   name                       - type name
41 --   type                       - either TYPE_HETEROGENEOUS
42 --                                or TYPE_HOMOGENEOUS
43 -- RETURNS
44 --   handle to the created type
45 
46  FUNCTION create_type ( parent_handle   IN NUMBER,
47                         name            IN VARCHAR2,
48                         type            IN BOOLEAN DEFAULT TYPE_HETEROGENEOUS )
49         RETURN NUMBER;
50 
51 -- SET_TYPE_PARAM: Set type attributes
52 -- PARAMETERS
53 --   handle                     - handle returned by CREATE_TYPE
54 --   name                       - parameter name:
55 --      SCHEMA_OBJECT (boolean) - TRUE = type is a schema object, i.e., it has a
56 --                                      SCHEMA filter whose value defaults to
57 --                                      the current user
58 --      SAVE_OBJNUM (boolean)   - TRUE = save objnums returned by this type
59 --                                     (default FALSE)
60 --      SAVE_SORTED_OBJNUM (boolean)
61 --                              - TRUE = save objnums and dependency#s
62 --                                     returned by this type
63 --                                     (default FALSE)
64 --      ALIAS (text)            - node name to use for this type when
65 --                                     constructing a path to the type
66 --                                     (defaults to type name)
67 --      DESCRIPTION (text)      - Text description of the type
68 --                                (for *_EXPORT_OBJECTS view)
69 --      INTERSECTS (text)       -
70 --      BASE_STEP (numeric)     - handle of base step
71 --      VERSION (text)          - version number of the first RDBMS version
72 --                                     that supports this type
73 --                                     Format n.n.n[.n[.n]], e.g., 10.2.0
74 --   value                      - parameter value
75 
76  PROCEDURE set_type_param (     handle  IN NUMBER,
77                                 name    IN VARCHAR2,
78                                 value   IN VARCHAR2 );
79 
80  PROCEDURE set_type_param (     handle  IN NUMBER,
81                                 name    IN VARCHAR2,
82                                 value   IN BOOLEAN );
83 
84  PROCEDURE set_type_param (     handle  IN NUMBER,
85                                 name    IN VARCHAR2,
86                                 value   IN NUMBER );
87 
88 -- CREATE_FILTER: Begin creation of a filter for a type.
89 --                The filter will not be inserted into the dictionary
90 --                until CLOSE is called.  If the owning type (designated
91 --                by 'handle') is not heterogeneous, then the filter must
92 --                already be defined in sys.metafilter$.
93 -- PARAMETERS
94 --   handle                     - handle of the type to which this filter
95 --                                belongs.
96 --   name                       - filter name
97 --   datatype                   - datatype:
98 --                                 DATATYPE_BOOLEAN
99 --                                 DATATYPE_NUMERIC
100 --                                 DATATYPE_TEXT
101 --                                 DATATYPE_TEXT_EXPR
102 --                                 DATATYPE_OBJNUM
103 -- RETURNS
104 --   handle to the created filter
105 
106  FUNCTION create_filter(handle          IN NUMBER,
107                         name            IN VARCHAR2,
108                         datatype        IN NUMBER)
109         RETURN NUMBER;
110 
111 -- SET_FILTER_PARAM: Set filter attributes
112 -- PARAMETERS
113 --   handle                     - handle returned by CREATE_FILTER
114 --   name                       - parameter name:
115 --      DEFAULT         - filter default value
116 --      DEFINITION      - (text) filter definition
117 --      VALUE           - fixed filter value
118 --      PARENT_NAME     - (text) name of parent filter from which to inherit
119 --      OBJNUM_FILTER   - (boolean) this is an objnum filter
120 --      REPLACEABLE     - (boolean) filter is replaceable
121 --      FILTER_LEAF     - (boolean) filters specific leaves, e.g.,
122 --                              BEGIN_WITH, PRIVILEGED_USER
123 --      FILTER_BRANCH   - (boolean) filters whole branches of the tree,
124 --                              e.g., EXCLUDE_PATH_EXPR
125 --      APPLY_IF_TRUE   - (boolean) a "special boolean filter".  Most boolean
126 --                              filters (e.g., 'PRIMARY') default to TRUE;
127 --                              they are not applied unless the user
128 --                              sets them FALSE meaning "don't return
129 --                              this kind of object".  Special boolean filters
130 --                              (e.g., 'WORK_PHASE') default to FALSE
131 --                              and are only applied when the user
132 --                              sets them TRUE.
133 --   value                      - parameter value
134 
135  PROCEDURE set_filter_param (   handle  IN NUMBER,
136                                 name    IN VARCHAR2,
137                                 value   IN VARCHAR2 );
138 
139  PROCEDURE set_filter_param (   handle  IN NUMBER,
140                                 name    IN VARCHAR2,
141                                 value   IN BOOLEAN );
142 
143  PROCEDURE set_filter_param (   handle  IN NUMBER,
144                                 name    IN VARCHAR2,
145                                 value   IN NUMBER );
146 
147 -- CLOSE: Insert all types and filters into the dictionary.
148 -- PARAMETERS
149 --   handle                     - handle returned by CREATE_TYPE
150 --                                for the top-level type
151 
152  PROCEDURE close (              handle  IN NUMBER );
153 
154 -- SET_DEBUG: Set the internal debug switch.
155 -- PARAMETERS:
156 --      on_off          - new switch state.
157 
158   PROCEDURE set_debug(
159                 on_off          IN BOOLEAN);
160 
161 -- SET_DEBUG_PARAM: Set debugging parameters.
162 -- PARAMETERS:
163 --   name                       - parameter name:
164 --      DIRECTORY         - Directory where debug file is written.
165 --                          Defaults to 'DATA_PUMP_DIR'
166 --      FILE              - Debug file name.
167 --                          Defaults to 'debug.trc'
168 --   value                      - parameter value
169 
170  PROCEDURE set_debug_param (   name    IN VARCHAR2,
171                                value   IN VARCHAR2 );
172 
173 END DBMS_METADATA_BUILD;