Boost logo

Boost :

From: Vertleyb (vertleyb_at_[hidden])
Date: 2002-04-29 21:52:39


Hi everybody,

A couple of days ago I posted a message asking whether there is an interest
in a library that implements type-safe relational algebra. Since a few
people did express their interest in this library, I just uploaded it into
the files section. The file name is tables.zip.

Here I will answer some questions I got (if anybody could explain me please
how to insert my message into the correct place in a thread using the
browser interface, provided by the boost web site, it would be an enormous
help!)

Itay asked:

>> Does this mean you cannot create a table which has two columns with the
same
>> type?

No. Columns are classes defined by the user with this macro:

COLUMN(c1, int);
COLUMN(c2, int);

Although c1 and c2 both hold an integer value, they are distinct classes,
since the above unwraps into something like:

class c1 : public column<int>{...};
class c2 : public column<int>{...};

Now c1 and c2 are placed into a typelist, and the tuple derives from both of
them.

Richard Scott asked:

>> can we use template arguments to use container
>> classes other than those from STL?

Ideally, we would want to keep 3 things nicely separated:

1) a tuple provides values given a column (class) name;
2) a table provides means to iterate through tuples. This maybe as simple
as a vector of tuples, or as complicated as dynamicaly constructing tuples
from a real RDBMS table;
3) relational algebra works with any table as long as it adheres to the
above description.

(Although this nice separation is not exactly the case right now)

Thank you guys for expressing the interest. We would appreciate any further
feedback.

Best regards,
Arkadiy


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