Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-11-01 16:14:54


Just a quick question: Can you eliminate the ugly MACRO?
When the library ever gets into boost, that would have to be
renamed to something like:

    BOOST_LIBRARY_NAME_COLUMN(a1, int)

Yuck!

--Joel

----- Original Message -----
From: "Arkadiy Vertleyb" <vertleyb_at_[hidden]>

> 1. We can have a column whose type is a table (see code below);
> 2. As far as other relations (operators) are concerned, right now we can't
> do this because currently the operators are not default constructible. This
> could be easily fixed.
> 3. Just out of curiosity, how would you use this feature? It might become a
> major advantage of this library over traditional RDBMSs.
>
> Arkadiy
>
> ==============================
>
> COLUMN(a1, int);
> typedef tuple<list<a1> > tuplea_type;
> typedef table<tuplea_type> tablea_type;
>
> COLUMN(b1, int);
> COLUMN(b2, tablea_type);
> typedef tuple<list<b1, list<b2> > > tupleb_type;
> typedef table<tupleb_type, list<b1> > tableb_type;
>
> void foo() {
> tableb_type tab;
> for (int i = 0; i < 5; ++i) {
> tablea_type t;
> t.insert(i);
> t.insert(i * i);
> t.insert(i * i * i);
> tab.insert(tupleb_type(i, t));
> }
> for (tableb_type::const_iterator it = tab.begin(); it != tab.end(); ++it){
> cout << "tuple " << FIELD(*it, b1) << endl;
> print(FIELD(*it, b2));
> }
> }


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk