PrevUpHomeNext

left_join()

The left_join() method is similar to inner_join() except that its output includes every output of the left-hand query at least once. It's a wrapper for SQL's LEFT JOIN.

For any queries l, r, you can call l.left_join(r, condition) provided that:

l and r's value mappers will both be visible to condition.

l.left_join(r, condition) returns a conditional_junction with the following characteristics:

Example
const query<std::tuple<screen, boost::optional<movie>>> no_screen_left_behind =
    screens.left_join(movies, screens->current_movie_id == movies->id);

PrevUpHomeNext