5.18
PLVlst: List Manager
The PLVlst (PL/Vision LiST manager) package provides a generic list manager for
PL/SQL
built on
PL/SQL
tables. See the companion disk for details.
-
list_undefined EXCEPTION;
-
Raised when you attempt to perform a PLVlst operation on an undefined list.
-
list_full EXCEPTION;
-
Raised when you attempt to add another item to a list which is already full (currently limited to maximum of 10,000 items in a list).
-
out_of_bounds EXCEPTION;
-
Exception raised when you try to reference an item in the list that is not defined.
5.18.2
Creating and destroying lists
-
PROCEDURE make (list_in IN VARCHAR2);
-
Allocates storage for a new list of the specified name.
-
FUNCTION is_made (list_in IN VARCHAR2) RETURN BOOLEAN;
-
Returns TRUE if the specified list already exists.
-
PROCEDURE destroy (list_in IN VARCHAR2);
-
Destroys the list, freeing up associated memory.
-
PROCEDURE appenditem (list_in IN VARCHAR2, item_in IN VARCHAR2);
-
Adds an item to the end of the specified list.
-
PROCEDURE insertitem
-
(list_in IN VARCHAR2, position_in IN NUMBER,
-
item_in IN VARCHAR2);
-
Inserts an item at the specified position in the list.
-
PROCEDURE prependitem (list_in IN VARCHAR2, item_in IN VARCHAR2);
-
Inserts an item at the first position of the list.
-
PROCEDURE replaceitem
-
(list_in IN VARCHAR2, position_in IN NUMBER,
-
item_in IN VARCHAR2);
-
Replaces the
n
th item in the list with the new item.
-
PROCEDURE deleteitem (list_in IN VARCHAR2, item_in IN VARCHAR2);
-
Deletes the first occurrence of the specified item from the list.
-
PROCEDURE deleteitem (list_in IN VARCHAR2, position_in IN NUMBER);
-
Deletes the item at the specified location in the list.
-
FUNCTION getitem (list_in IN VARCHAR2, position_in IN NUMBER);
-
Returns the
n
th item from the list.
-
FUNCTION getposition (list_in IN VARCHAR2, item_in IN VARCHAR2)
-
RETURN NUMBER;
-
Returns the position of the specified item in the list.
-
FUNCTION nitems (list_in IN VARCHAR2) RETURN INTEGER;
-
Returns the number of items currently in the list.
-
PROCEDURE display (list_in IN VARCHAR2);
-
Displays the contents of the specified list.
Copyright (c) 2000 O'Reilly & Associates. All rights reserved.
|
|