Dont Panic!

Some utilities

PreviousPage NextPage

Updated: 19 Feb 16

Main

Contact Me

Software

Free Script and utilities

Table API generator

Data Unload

Grants,Synonyms,Sequences

PHP Utils

Old SQL guide

Old PL/SQL guide

A Jersey Linux User Group?

Generate PL/SQL API base package for table(s).

Updated to version 4
This is a script that I use now and then. I do not like to write and rewrite the same base-code over and over again, and I find it much faster to delete code that I do not like, then writing it from scratch. The script creates a pl/sql package with package specification and body code for one or more tables. It can create them as functions or procedures and with code for "insert, delete, update, select and refcursor" ( i.e. Use "customer%" to generate code for all tables named customer-something ). Do not target too many tables since the package will be quite large and hard to customize. The script and package reads the Oracle data dictionary to retrieve table information.
The resulting code should compile as is in in Oracle 11 and probably down to version 8. You will have to scan trough the code and change PK-generation and in-data test that are site specific. It is base-code to get you started in developing more application specific functions from. Read the header information in the package for more info and settings/modifications.

Also use the test script supplied to view an example on how to use it. To use it: Start SQLPlus,
Log in to the database to a schema owner id, run the script with:
@@GenPkg
It will ask you for:
table-name (may be wildcard),
Package name, and
Your Name (to be included in the code as reference/creator)
This will generate a file with the name "Package name"_gen.pkg

Code is released under the terms of the GNU General Public License as published by the Free Software Foundation.

Nice things

images/ora_logo.gif
images/mysql_100x52.gif


And OpenSource Sw

images/samba.gif


I use fedora linux

try it or try

Ubuntu or PcLinuxOs


Share information and knowledge!

images/180px-Green_and_white_machine.jpg

I'm based in Jersey, Available for assignments in all of Europe, On-Site or Remote. Call or mail me!

What OpenSource Software could do for Business in Jersey!