MySQL joins
MySQL allows you to join tables directly to the "main" table and update
rows of all joined tables. This is possible by passing all tables to the
updateTable
method as a list and adding the ON
conditions as WHERE
statements. You can then use the set(column, value)
variant to update
columns using table qualified names.
The UpdateQueryBuilder
also has innerJoin
etc. join methods, but those
can only be used as part of a PostgreSQL update set from join
query.
Due to type complexity issues, we unfortunately can't make the same
methods work in both cases.
The API documentation is packed with examples. The API docs are hosted here, but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away!
For example, check out these sections: