Advanced Oracle PL/SQL Programming with Packages

Advanced Oracle PL/SQL Programming with PackagesSearch this book
Previous: 5.17 PLVlog: Logging FacilityChapter 5
PL/Vision Package Specifications
Next: 5.19 PLVmsg: Message Handling
 

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.

5.18.1 Package exceptions

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.

5.18.3 Modifying list contents

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 nth 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.

5.18.4 Analyzing list contents

FUNCTION getitem (list_in IN VARCHAR2, position_in IN NUMBER);

Returns the nth 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.


Previous: 5.17 PLVlog: Logging FacilityAdvanced Oracle PL/SQL Programming with PackagesNext: 5.19 PLVmsg: Message Handling
5.17 PLVlog: Logging FacilityBook Index5.19 PLVmsg: Message Handling

The Oracle Library Navigation

Copyright (c) 2000 O'Reilly & Associates. All rights reserved.

Library Home Oracle PL/SQL Programming, 2nd. Ed. Guide to Oracle 8i Features Oracle Built-in Packages Advanced PL/SQL Programming with Packages Oracle Web Applications Oracle PL/SQL Language Pocket Reference Oracle PL/SQL Built-ins Pocket Reference
This HTML Help has been published using the chm2web software.