PrevUpHomeNext

With a Collector Class

All the functions in the join() family, other than jump(), support mapped classes as an output format, as an alternative to std::tuples. Just like the collector classes for select(), they don't affect the generated SQL, but they might afford some extra convenience, if you like to use meaningful member names instead of get<0>() etc.

If:

then you can add C as a template parameter to the call J, provided that:

Then the returned query has the following characteristics:

Example
// Somewhere in a namespace, not in a function

struct movie_deployment {
    boost::optional<screen> s;
    movie m;
};
QUINCE_MAP_CLASS(movie_deployment, (s)(m));


// Somewhere inside a function:

const query<movie_deployment> movie_deployments =
    screens.right_join<movie_deployment>(movies, screens->current_movie_id == movies->id);

PrevUpHomeNext