Oracle 8i Data Cartridge Developer's Guide Release 2 (8.1.6) Part Number A76937-01 |
|
Methods: Using PL/SQL, 3 of 6
A package is a group of PL/SQL types, objects, and stored procedures and functions. The specification part of a package declares the public types, variables, constants, and subprograms that are visible outside the immediate scope of the package. The body of a package defines the objects declared in the specification, as well as private objects that are not visible to applications outside the package.
The following example shows the package specification for the package named DS_package. This package contains the two stored functions ds_findmin and ds_findmax, which implement the DataStreamMin and DataStreamMax functions defined for the DataStream object type.
create or replace package DS_package as function ds_findmin(data clob) return pls_integer; function ds_findmax(data clob) return pls_integer; pragma restrict_references(ds_findmin, WNDS, WNPS); pragma restrict_references(ds_findmax, WNDS, WNPS); end;
For the DataStream type and type body definitions, see Chapter 2, "Roadmap to Building a Data Cartridge".
For more information about PL/SQL packages, see the chapter about using procedures and packages in the Oracle8i Supplied Packages Reference.
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|