1 PACKAGE driths AS
2
3 type phrtab is table of dr$ths_phrase%rowtype index by binary_integer;
4
5 /*--------------------------------- get_ths -------------------------------*/
6 /*
7 NAME
8 get_ths -- lookup thesaurus id and case-sensitivity
9
10 ARGUMENTS
11 tname - thesaurus name
12 tid - thesaurus id (OUT)
13 tcs - thesaurus case sensitivity (OUT)
14 modify - set to TRUE if you want to do ownership checking
15
16 NOTES
17 error if thesaurus does not exist
18 */
19 PROCEDURE get_ths(
20 tname in varchar2,
21 tid out number,
22 tcs out boolean,
23 modify in boolean default FALSE
24 );
25
26 /*--------------------------------- parse_phrase ---------------------------*/
27 /*
28 NAME
29 parse_phrase
30
31 DESCRIPTION
32 This procedure parses a phrase into phrase and qualifier parts
33
34 RETURN
35 */
36
37 PROCEDURE parse_phrase (
38 phrase in varchar2,
39 ppart out varchar2,
40 qpart out varchar2
41 );
42 PRAGMA SUPPLEMENTAL_LOG_DATA(parse_phrase, AUTO);
43
44 /*--------------------------------- lookup -------------------------------*/
45 /*
46 NAME
47 lookup -- lookup phrase in a thesaurus
48
49 DESCRIPTION
50 This procedure looks up a phrase in the given thesaurus
51
52 RETURN
53 TRUE if phrase is found, FALSE otherwise
54 */
55
56 FUNCTION lookup (
57 tname in varchar2,
58 phrase in varchar2,
59 resarr in out phrtab
60 ) return boolean;
61
62
63 /*----------------------------- lookup_single-----------------------------*/
64 /*
65 NAME
66 lookup_single -- lookup a single phrase in a thesaurus
67
68 DESCRIPTION
69 This procedure looks up a phrase in the given thesaurus
70
71 RETURN
72 phrase id
73
74 NOTES
75 phrase must exist in thesaurus
76 if hits multiple phrases, only the first is returned
77 */
78 FUNCTION lookup_single (
79 tid in number,
80 phrase in varchar2,
81 qual in varchar2
82 ) return number;
83
84
85 end driths;