Category Archive Template
21st Century PL/SQLYour chance to influence the direction of the Oracle PL/SQL language. |
|||||
|
Program unit construction and structure > Packages With PL/SQL, you can create and manage packages of program units, collections of procedures, functions, types and data. Packages are the single-most important and useful building block for PL/SQL-based applications. Ideas within Packages
May 19, 2005Add Unit Test supportInstead of asking developers, or some "3rd party" code, to manage their unit tests, add unit testing to the database.Add a command like: CREATE UNIT TEST abc ON xyz AS <code> END;The unit test code would return an integer of the number of tests that failed, zero meaning success. The DBMS would execute the unit test whenever the base procedure is compiled and return a warning message if any tests failed. An alternative coding technique would be to have the unit test to throw an exception rather than return an integer. In either case the important aspect is that the DBMS automatically executes the Unit Test at compilation time and that the Data dictionary records which procedures passed their tests and which failed. Steven Posted by Steven Ensslen at 07:12 PM | Add your thoughts (1) June 23, 2005Allow arbitrary depth of package hierarchiesIt would be good to be able to have any number of levels in a package hierarchy, much like in C#-namespaces or in Java-packages. Then it would be possible to have much more structured and reasonable naming-policies and also avoid tempting DBAs to employ schemas as top-level packages. Here are some additional details: What I'm looking for is to be able to have a package called say: graphics.twodim.line So if I define it belonging to the schema Runtime, then its function intersects(x1,y1,x2,y2) could be referenced by anyone writing: Runtime.graphics.twodim.line.intersects(x1,y1,x2,y2) Another package residing at the Runtime.graphics level (say, Runtime.graphics.surface) could reference the same function using twodim.line.intersects(x1,y1,x2,y2)... and so on This would be similar to the way packages are managed in Java, and namespaces in C#, and would allow (in my opinion) a better structure to many complex PL/SQL systems that now rely on complex package-names to indicate structure and relations. I currently work in a setting where we have hundreds of packages and long ago started to use schemas to get a fake second level to the package-hierarchy only for the purpose of structure. This means some unnecessary granting and security concerns since the schemas are used somewhat out of their natural context. Especially for people new to our system (like myself) this seems strange and contrived, and I imagine a fix would be easy(?). Posted by Øyvind Mo at 07:04 AM | Add your thoughts (1) January 23, 2006some kind of global listenerit would be nice if i may register a kind of global listener in a package. e.g. i do some processing or checks in various private routines. if one of the checks fails i want to set the listener to false. then the package should react to this event so i have not to use if/then/else in the master routine.Posted by daniel westermann at 10:47 AM | Add your thoughts (1) |
Sidebar Template Search Template Search 21st Century PL/SQLActions Template ActionsIdeas List Template Browse Categories
|
||||