Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Genereic reference type in PL/SQL?

Re: Genereic reference type in PL/SQL?

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 17 Oct 2006 15:16:30 -0700
Message-ID: <4535563e$1@news.victoria.tc.ca>


Thomas Blankschein (thomas_at_blankschein.de) wrote:
: Hello,

: I work with Oracle 9.2.0.7 Standard.

: I know about the REF CURSOR type. But is it possible to create and use
: references for other types, like pointers in C/C++?

Yes (but not as "pointers to memory").

Do it the same as in java, using objects.

Create a base object class, and use an object of that type as your formal parameter to a procedure.

At run time, create an instance of an appropriate sub-class and pass that as the real parameter.

The run-time behaviour will then vary depending on the type of object.

Java books are full of examples of coding patterns that can be used to implement behaviour that is similar in effect to using C-like pointers.

One thing to beware is to not include your class types within the datamodel because you end up with all sorts of unanticipated headaches, but using them in your pl/sql code is not a problem.

$0.10 Received on Tue Oct 17 2006 - 17:16:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US