![]() ![]() You want clients to have access to the API, but not to the helper packages. You implement a PL/SQL application as several packages-one package that provides the application programming interface (API) and helper packages to do the work. You use this clause in situations like these: The ACCESSIBLE BY clause of the package specification lets you specify a white list of PL/SQL units that can access the package. ![]() The AUTHID clause of the package specification determines whether the subprograms and cursors in the package run with the privileges of their definer (the default) or invoker, and whether their unqualified references to schema objects are resolved in the schema of the definer or invoker. ![]() In either the package specification or package body, you can map a package subprogram to an external Java or C subprogram by using a call specification, which maps the external subprogram name, parameter types, and return type to their SQL counterparts. You can change the body without changing the specification or the references to the public items therefore, you can think of the package body as a black box. Finally, the body can have an initialization part, whose statements initialize variables and do other one-time setup steps, and an exception-handling part. The body can also declare and define private items that cannot be referenced from outside the package, but are necessary for the internal workings of the package. The body must define queries for public cursors and code for public subprograms. If the public items include cursors or subprograms, then the package must also have a body. A package is compiled and stored in the database, where many applications can share its contents.Ī package always has a specification, which declares the public items that can be referenced from outside the package. A package is a schema object that groups logically related PL/SQL types, variables, constants, subprograms, cursors, and exceptions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |