Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2003-09-11 07:30:55

Jonathan de Halleux ha escrito:

> Ok, the example was too trivial.
> Suppose that I add a products struct and a product_id to the order struct:
> struct order
> {
> int id;
> int client_id; // foreign key to client
> int product_id; // foreign key to product
> bool operator<(const order& o)const{return id<;}
> };
> struct product
> {
> int id;
> }
> I define another set to products. How do I perform joins on those three
> sets ? For example,
> get all the order done by a client c and of a product p ? :)
> I've seen in ex. 3 that you define some kind of intermediary view. Is there
> a way to "automate" that ?

Basically, the examples uses an indexed_set of pointers to the objects
instead of actual objects, thus avoiding copying.
This thing could be automated, but I think it'll get us far too away from the
original intention of the library.
Arkadiy Vertleyb et al. are working on a relational database STL-like
framework --my hunch is that indexed_set could serve as a robust
building block in that library.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Boost list run by bdawes at, gregod at, cpdaniel at, john at