DBA Data[Home] [Help]

PACKAGE: CTXSYS.DRVXMD

Source


1 package drvxmd authid current_user is
2 
3 
4 /*---------------------------- GetIndexMD  -------------------------------*/
5 /* fetch selected dr$index column values into out variables */
6 
7 procedure GetIndexMD(
8   p_idxid           in  number,
9   o_owner           out varchar2,
10   o_owner#          out number,
11   o_name            out varchar2,
12   o_table_obj#      out number,
13   o_table_dataobj#  out number,
14   o_key_name        out varchar2,
15   o_key_type        out binary_integer,
16   o_text_name       out varchar2,
17   o_text_type       out binary_integer,
18   o_text_length     out binary_integer,
19   o_lang_col        out varchar2,
20   o_fmt_col         out varchar2,
21   o_cset_col        out varchar2,
22   o_idx_type        out binary_integer,
23   o_idx_option      out varchar2,
24   o_idx_sync_type   out varchar2,
25   o_idx_sync_memory out binary_integer,
26   o_idx_src_name    out varchar2,
27   o_idx_src_id      out binary_integer,
28   o_idx_version     out binary_integer,
29   o_config_col      out varchar2
30 );
31 
32 /*---------------------------- GetIndexPartition  -----------------------*/
33 /* get dr$index_partition information */
34 
35 procedure GetIndexPartition(
36   o_id               out number,
37   o_tabpart_dataobj# out number,
38   o_sync_type        out varchar2,
39   o_sync_memory      out number,
40   o_option           out varchar2,
41   i_cid               in number,
42   i_pname             in varchar2
43 );
44 
45 /*---------------------------- OpenIndexMDScan ----------------------*/
46 /* open dr$index_object and value cursors */
47 
48 procedure OpenIndexMDScan(
49   p_idxid           in  number
50 );
51 
52 /*---------------------------- NextIndexObject ---------------------------*/
53 /* get next dr$index_object cursor */
54 
55 function NextIndexObject(
56   o_cla_id          out binary_integer,
57   o_obj_id          out binary_integer,
58   o_acnt            out binary_integer
59 ) return binary_integer;
60 
61 /*---------------------------- NextIndexValue ----------------------------*/
62 /* get next dr$index_value cursor */
63 
64 function NextIndexValue(
65   o_cla_id          out binary_integer,
66   o_att_id          out binary_integer,
67   o_datatype        out binary_integer,
68   o_sub_group       out binary_integer,
69   o_sub_att_id      out binary_integer,
70   o_sub_datatype    out binary_integer,
71   o_value           out varchar2
72 ) return binary_integer;
73 
74 /*---------------------------- NextIndexCDI ---------------------------*/
75 /* get next dr$index_cdi_column cursor */
76 
77 function NextIndexCDI(
78   o_cdi_pos         out binary_integer,
79   o_cdi_type#       out binary_integer,
80   o_cdi_len         out binary_integer,
81   o_cdi_name        out varchar2,
82   o_cdi_sec         out varchar2,
83   o_cdi_stype       out binary_integer,
84   o_cdi_id          out binary_integer
85 ) return binary_integer;
86 
87 /*---------------------------- GetDocidCount -----------------------------*/
88 /* get docid count */
89 
90 function GetDocidCount(
91   p_idxid           in number,
92   p_ixpid           in number default null
93 ) return number;
94 
95 
96 /*--------------------------- GetNextId -------------------------------------*/
97 /* get next docid */
98 
99 function GetNextId(
100   p_idxid in binary_integer,
101   p_ixpid in binary_integer default null
102 ) return binary_integer;
103 
104 /*---------------------------- GetIndexStats -----------------------------*/
105 /* get index stats from dr$stats */
106 
107 procedure GetIndexStats(
108   p_idxid           in number,
109   p_smplsz          in out nocopy number
110 );
111 
112 /*---------------------------- GetBaseTableName --------------------------*/
113 /* get base table name */
114 
115 function GetBaseTableName(
116   p_idxid           in number,
117   p_ixpid           in number default null
118 ) return varchar2;
119 
120 /*---------------------------- IncrementDocCnt --------------------------*/
121 /* increment docid count */
122 
123 procedure IncrementDocCnt(
124   p_idxid           in number,
125   p_ixpid           in number,
126   p_delta           in number
127 );
128 
129 /*--------------------------- DecrementDocCnt ------------------------------*/
130 /* decrement docid count */
131 procedure DecrementDocCnt(
132   p_idxid in number,
133   p_ixpid in number,
134   p_delta in number
135 );
136 
137 /*---------------------------- AllocateDocids ---------------------------*/
138 /* allocate docids */
139 
140 procedure AllocateDocids(
141   p_idxid           in  number,
142   p_ixpid           in  number,
143   p_allocsz         in  binary_integer,
144   p_startid         out number
145 );
146 
147 /*---------------------------- RecordIndexError -------------------------*/
148 /* records an error to the dr$index_error table */
149 
150 procedure RecordIndexError(
151   p_idxid           in number,
152   p_textkey         in varchar2,
153   p_stack           in varchar2
154 );
155 
156 /*---------------------------- OptStartTimer -----------------------------*/
157 /* starts optimization timer */
158 
159 procedure OptStartTimer;
160 
161 /*---------------------------- OptGetTimer -------------------------------*/
162 /* gets optimization timer */
163 
164 function OptGetTimer return binary_integer;
165 
166 /*---------------------------- OptGetState -------------------------------*/
167 /* get full optimize state */
168 
169 procedure OptGetState(
170   p_idxid       in  number,
171   p_ixpid       in  number,
172   p_ntable_name in  varchar2,
173   p_itable_name in  varchar2,
174   p_sntable_name in  varchar2,
175   p_beg_s_opt   in  boolean,
176   o_opt_token   out varchar2,
177   o_opt_type    out number
178 );
179 
180 /*---------------------------- OptGetType -------------------------------*/
181 /* get type optimize start token */
182 
183 procedure OptGetType(
184   p_idxid       in  number,
185   p_ixpid       in  number,
186   p_ntable_name in  varchar2,
187   p_itable_name in  varchar2,
188   p_sntable_name in  varchar2,
189   o_opt_token   out varchar2,
190   o_opt_type    in  number
191 );
192 
193 /*---------------------------- OptSetState -------------------------------*/
194 /* set full optimize state */
195 
196 procedure OptSetState(
197   p_idxid       in  number,
198   p_ixpid       in  number,
199   p_opt_token   in  varchar2,
200   p_opt_type    in  number
201 );
202 
203 /*---------------------------- GetFieldSecName -----------------------------*/
204 /* get field section name */
205 
206 function GetFieldSecName (
207   p_idxid  in number,
208   p_secid  in number
209 ) return varchar2;
210 
211 /*---------------------------- GetPrefClaObj -----------------------------*/
212 
213 procedure GetPrefClaObj(
214   p_preid  in  number,
215   o_claid  out number,
216   o_objid  out number
217 );
218 
219 /*---------------------------- GetObjDefault -----------------------------*/
220 
221 procedure GetObjDefault(
222   p_oatid   in  number,
223   o_default out varchar2
224 );
225 
226 /*---------------------------- OpenPrefValue ------------------------------*/
227 
228 procedure OpenPrefValue(
229   p_preid   in number
230 );
231 
232 /*---------------------------- NextPrefValue ------------------------------*/
233 
234 function NextPrefValue(
235   o_value   out varchar2,
236   o_oatid   out number
237 ) return binary_integer;
238 
239 /*---------------- set_reverse_docid_switch  -------------------*/
240 /*
241   NAME
242     Set_reverse_docid_switch
243 
244   DESCRIPTION
245     Turns ON/OFF reverse docid processing for a specified index.
246 
247   ARGUMENTS
248     owner_name     index owner
249     index_name     index name
250     value          switch value (ON or OFF)
251 */
252 PROCEDURE set_reverse_docid_switch(
253   owner_name     in  varchar2,
254   index_name     in  varchar2,
255   value          in  varchar2
256 );
257 PRAGMA SUPPLEMENTAL_LOG_DATA(set_reverse_docid_switch, AUTO);
258 
259 /*------------------- get_functional_cache_size ----------------------------*/
260 FUNCTION get_functional_cache_size RETURN number;
261 
262 /*--------------- GetMVFlag ------------------------------------------------*/
263 /*
264   NAME
265     GetMVFlag
266 
267   DESCRIPTION
268     Check whether it's index on Materialized View
269 
270   ARGUMENTs
271     table_id
272     owner_name
273     opt              1 -- index on MView
274                      0 -- not index on MView
275 */
276 
277 PROCEDURE GetMVFlag(
278   table_id       in  number,
279   owner_name     in  varchar2,
280   opt            out binary_integer
281 );
282 
283 /*---------------------------- GetSecDataType -----------------------------*/
284 /* get section datatype, mainly for MDATA and SDATA */
285 
286 function GetSecDataType (
287   p_idxid  in number,
288   p_secid  in number
289 ) return number;
290 
291 /*---------------------------- ChkIndexOption -----------------------------*/
292 /*
293   Take in index id, and an option letter (see drdmlop() for a list of
294   options), return 1 if the given option is set, 0 otherwise.
295 */
296 function ChkIndexOption (
297   p_idxid  in number,
298   p_opt    in varchar2
299 ) return number;
300 
301 /*---------------------------- SelectUserAnlDictLob-----------------------------*/
302 /*
303   Take index id and dictionary language as input and return user supplied
304   dictionary lob to be used by ATG auto lexer
305 */
306 function SelectUserAnlDictLob(
307   p_idxid  in number,
308   p_dictlang in varchar2
309 ) return clob;
310 
311 /*--------------------------- ctx_sqe_tbl_func ------------------------------*/
312 /*
313   Table function for creating the ctx_user_sqes view
314 */
315 type ctx_sqe_type is record(
316   sqe_owner# number,
317   sqe_name varchar2(30),
318   sqe_query clob);
319 
320 type ctx_sqe_type_tab is table of ctx_sqe_type;
321 
322 function ctx_sqe_tbl_func
323   return ctx_sqe_type_tab pipelined;
324 
325 /*---------------------- check_file_access_role -----------------------------*/
326 /*
327    Returns TRUE if the specified user has the role given by file_access_role
328    and can therefore create/sync indexes using file or URL datastore
329 */
330 function check_file_access_role(p_user IN varchar2) return boolean;
331 
332 /*--------------------------- autoopt_prep --------------------------------*/
333 /* autoopt_prep - preparation for autoopt */
334 procedure autoopt_prep(p_idxid in number,
335                        p_ixpid in number,
336                        p_wait in number,
337                        p_lockret in out number
338 );
339 
340 /*--------------------------- autoopt_clo --------------------------------*/
341 /* autoopt_clo - close for autoopt */
342 procedure autoopt_clo;
343 
344 /*--------------------------- autoopt_push_token --------------------------*/
345 /* autoopt_push_token - push a token to autooptimize */
346 procedure autoopt_push_token(p_idxid in number,
347                              p_message in raw);
348 
349 /*--------------------------- TxnalGetKey --------------------------------*/
350 /* Return the key if it has been set.  Returns Null if not set            */
351 procedure TxnalGetKey(
352   p_key in out raw
353 );
354 
355 /*--------------------------- TxnalSetKey --------------------------------*/
356 /* Set the key.  Set flag                                                 */
357 procedure TxnalSetKey(
358   p_key in raw
359 );
360 
361 /*------------------------ GetSLXMdataSecID ------------------------------*/
362 /* Get section id/token type for DR$ML MDATA section, doc level lexer     */
363 
364 FUNCTION GetSLXMdataSecID(
365   idxid in number
366 ) return number;
367 
368 /*------------------------ RecordOptTokenError ---------------------------*/
369 PROCEDURE RecordOptTokenError(
370   token_text in varchar2,
371   token_type in number
372 );
373 
374 /*----------------------- ProcessN -------------------------------*/
375 PROCEDURE ProcessN(p_idxid in number,
376                    p_ixpid in number,
377                    del in number);
378 
379 /* 14175174: ------------- SubstringEnabled ------------------------*/
380 FUNCTION SubstringEnabled(p_idxid in number) RETURN number;
381 
382 
383 /*---------------------------- IndexHasGTable ------------------------------*/
384 FUNCTION IndexHasGTable(
385   p_idxid in number,
386   p_ixpid in number default NULL)
387 RETURN boolean;
388 
389 end drvxmd;