Question

Let say I have two tables with a many-to-many relationship (i.e. there is a 3rd table only used for the relationship).

Does SOCI support the different types of 'join' in the statements?

If yes, does it work with all the databases (so called backends in the documentation) ?

Thanks!

Was it helpful?

Solution

With SOCI, you still have to construct your SQL statements and you can put joins in them (or anything else for that matter). SOCI basically just helps you

  1. to get your input data into the SQL query (with use(...)) and
  2. to work with the returned results in a nice way (with into(...) and rowset, etc.).

Since the result of a select is just a list of rows, no matter whether you use join or not, there's nothing stopping you from using them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top