rem rem Patched file for use of GUIDs - Alan Fackerell 16-Dec-1998 rem rem ciilok.idgen functions modified to call jr_util.get_new_irid rem rather than use sdd_irid_seq.nextval rem ciilok.reset_idgen set to null ; rem rem $Header: \\ukst76\rcsroot.7_0\model\repman40\api\RCS\cilok.ipb 1.2 1998/08/03 17:51:39 cvanes Exp $ rem Rem Copyright (c) 1993 by Oracle Corporation Rem NAME Rem ciilok.pkb - Rem DESCRIPTION Rem Rem returnS Rem Rem NOTES Rem Rem MODIFIED (MM/DD/YY) Rem jwetherb 01/10/95 - Strip unnecessary check from idgen Rem jwetherb 10/20/94 - num_ranges -> 3; range_size -> 1000 Rem jwetherb 10/20/94 - Move default constants to package body Rem jwetherb 10/18/94 - Add WHERE and ORDER BY clauses to cursor Rem jwetherb 08/09/93 - Creation REM REM CIILOK: REM This package contains routines for managing allocation of reference values. REM API sessions are initialized with a call to reset_ref_gen followed by REM allocate_new_range, and then subsequent calls to idgen will return REM unique reference values which will not clobber values retrieved directly REM from CODE_CONTROLS. REM REM NOTE that the dbms_lock package is used throughout, so execute privilege REM on dbms_lock must be granted to the schema which owns ciilok. Also, REM lock_handles are available to multiple sessions, which may pose a problem REM in subsequent releases of the procedural option. REM CREATE OR REPLACE PACKAGE BODY ciilok IS FUNCTION idgen RETURN number IS current_next_val number; BEGIN -- select sdd_irid_seq.nextval into current_next_val from sys.dual; -- changed for use of GUID afackere (16-dec-1998) current_next_val := jr_util.get_new_irid ; return(current_next_val); END; PROCEDURE idgen(current_array in out NumberArray, num_seq number) IS BEGIN for i in 1..num_seq loop -- select sdd_irid_seq.nextval into current_array(i) from sys.dual; -- changed for use of GUID afackere (16-dec-1998) current_array(i) := jr_util.get_new_irid ; end loop; END; PROCEDURE reset_idgen(sequence_id number) IS curr_seq_id number; BEGIN -- curr_seq_id := idgen; -- while curr_seq_id < sequence_id loop -- select sdd_irid_seq.nextval into curr_seq_id from sys.dual; -- end loop; -- removed with changes for use of GUID afackere (16-dec-1998) -- this function should not be called null ; END; --=================================== END ===================================-- -- -- Package instantiation block -- BEGIN is_installed := true; END; -- package ciilok /