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 -> SQL Problems with References 2nd try.

SQL Problems with References 2nd try.

From: Witold Kaminski, Student <witold_at_eas.iis.fhg.de>
Date: Tue, 18 May 1999 11:22:13 +0200
Message-ID: <37413144.53D4576A@eas.iis.fhg.de>

  1. I am working with Orace8 and I want to create the following data-structure: (It ist described in C++) - how I have to to this in SQL ?

#include <vector>

// Data - Structure

// 1.
template <class X>
class reflist
{

    public:

        vector<X *> ref_entry;
};

template <class X>
class test
{

    public:

        int something;
        reflist<X> ref_table;

};

template <class X>
class table_test
{

    public:

        vector<test<X> > table_of_test; };

// 2.
class headmain
{

    public:
    // some data

        int a,b;
};

class main0 : public headmain
{

    public:

        test<headmain> *pointer_to;
};

// 3.
typedef table_test<headmain> my_table;

2. It is possible to use C++ in SQL
I want to make my own C++-vector-class in SQL:

namespace SQL
{

template <class X>
class vector
{

    vector();
    addElement(X element);
};

template <class X>
vector<X>::vector()
{

    EXEC SQL CREATE TABLE /*varname*/ of X; }

}

so the 2 following calls are equal:

    EXEC SQL CREATE TABLE testtable of number;     vector<number> testtable;

is something like that possible ? Received on Tue May 18 1999 - 04:22:13 CDT

Original text of this message

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