PrevUpHomeNext

inner_join()

The inner_join() method builds a query that produces all combinations of two queries' outputs that together meet some condition. It's a wrapper for SQL's INNER JOIN.

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

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

l.inner_join(r, condition) returns a conditional_junction (that's a kind of query) with the following characteristics:

l.inner_join(r, condition) is interchangeable with l.join(r).where(condition), which has exactly the same characteristics.

Example
const query<std::tuple<screen, movie>> current_screenings =
    screens.inner_join(movies, screens->current_movie_id == movies->id);

PrevUpHomeNext