Freitag, 20. September 2013

< Oracle "pipelined" functions and Powerdesigner 16.1 >

During a recent project assignment, I had to generate Oracle 11g "pipelined" functions using Sybase Powerdesigner 16.1.

The stock Powerdesigner does not provide a "pipelined" keyword for Oracle.

But, luckily, Powerdesigner has an excellent metadata system which can be used to add the necessary keyword on demand.
  1. from the main menu, choose Database/Edit Current DBMS... 
  2. in the General tab, right-click Profile and choose Add Metaclasses... 
  3. click on the DatabasePackageProcedure selection box, then OK 
  4. right-click DatabasePackageProcedure and choose New->Extended Attribute 
  5. name the new attribute IsPipelined, use false as the default value and click Accept 
  6. in the tree-selection, go to Script/Objects/DB Package Procedure/Add 
  7. in the Value text-field, replace this existing code:


    with this one:

    %DBPKPROCTYPE% %DBPKPROC%[ (%DBPKPROCPARAM%)][ return %DBPKPROCRETURN%][%IsPipelined%? pipelined][ [.O:[as][is]]

    and choose OK. The DBMS properties window will close and Powerdesigner will ask you to save the changes you just made - click Yes.
  8. open the appropriate database function and right-click to open it's properties
  9. activate the new IsPipelined attribute in the Extended Attributes tab for "pipelined" functions

Keine Kommentare:

Kommentar veröffentlichen