Boost logo

Boost :

From: Jonathan de Halleux (dehalleux_at_[hidden])
Date: 2003-09-11 04:43:31


Very (very) interresting. I know you mention that "it is not intended to
provide a full-fledged relational database framework" but could it be
possible to support basic join operations.

Suppose that we have:

struct client
     int id;
     bool operator<(const client& e)const{return id<;}

struct order
     int id;
     int client_id; // foreign key to client
     bool operator<(const order& o)const{return id<;}

Ok, so the indexed sets for these would be:
typedef indexed_set<
> client_set;

typedef indexed_set<
     unique<identity<order> >,
     non_unique< tag<client>, member<order,int,&employee::client_id> > >
> order_set;

Now that I have my two sets, I would like to get all the orders done by a
particular client ?

Jonathan de Halleux, Research Assistant
Center for Systems Engineering and Applied Mechanics (CESAME)
Universite catholique de Louvain
Batiment Euler , Av. Georges Lemaitre, 4 Tel : +32-10-47 2595
B-1348 Louvain-la-Neuve Belgium
E-mail : dehalleux_at_[hidden]

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