1 PACKAGE qa_performance_temp_pkg AUTHID CURRENT_USER AS
2 /* $Header: qatemps.pls 120.1 2005/06/09 07:54:49 appldev $ */
3
4 --
5 -- This is a package that will be used as a table
6 -- handler or utility for accessing the
7 -- qa_performance_temp global temp table. This
8 -- table is used mainly for SQL Bind Compliance.
9 -- When there is an IN list where we do not know
10 -- of the no. of binds in advance (for example,
11 -- this happens a lot in transaction integration,
12 -- when we do not know the no. of applicable plans
13 -- during design time), then the values to be
14 -- bound would be inserted into this temp table.
15 -- The original SQL is rewritten to use an IN
16 -- sub-select query. See info in the SQL Bind
17 -- Compliance FAQ:
18 -- http://www-apps.us.oracle.com/atg/plans/r1159/sqlbindfaq.htm
19 --
20 -- bso Sat Apr 16 14:24:56 PDT 2005
21 --
22
23 --
24 -- Utility function to parse a comma-separated list of
25 -- integers into a number array. Return the no. of
26 -- elements parsed. Can be re-used by any other logic.
27 --
28 -- The incoming p_ids should be a comma-separated list
29 -- of integers. In the event of double commas, such as
30 -- '1,2,,3,4' a NULL element will occur in position 3 of
31 -- the returned array as expected. In case of one single
32 -- leading comma, such as ',1,2,3'. It will be ignored
33 -- and an array of 3 elements will be returned.
34 --
35 FUNCTION parse_integers(
36 p_ids VARCHAR2,
37 x_ids OUT NOCOPY dbms_sql.number_table)
38 RETURN NUMBER;
39
40 --
41 -- Parse the input ID list (comma-separated) and
42 -- insert each individual IDs into the temp table.
43 --
44 PROCEDURE add_ids(p_key VARCHAR2, p_id_list VARCHAR2);
45
46 --
47 -- A simple purge API to delete the IN list values
48 -- for a particular key.
49 --
50 PROCEDURE purge(p_key VARCHAR2);
51
52 --
53 -- Since the above are being called often from pld
54 -- it is more performing to create a wrapper for
55 -- purge and add with once server call.
56 --
57 PROCEDURE purge_and_add_ids(p_key VARCHAR2, p_id_list VARCHAR2);
58
59
60 -- Bug 4345779. Audits project.
61 -- Added the following methods.
62 -- srhariha. Wed Jun 1 12:13:02 PDT 2005.
63
64 PROCEDURE purge_and_add_names(p_key VARCHAR2, p_names dbms_sql.VARCHAR2_TABLE);
65
66
67 -- End 4345779. Audits project.
68 END qa_performance_temp_pkg;