In Slick 3.0, they took a slightly different approach, instead of having updateAll methods, as I understand it, using combinators.
So, the main idea is to define some actions on the data, and then combine them into a database to make one run. Example:
// let assume that you have some table classes defined somewhere // then let define some actions, they might be really different val action: SqlAction = YourTable.filter(_id === idToAssert) val anotherAction = AnotherTable.filter(_.pets === "fun") // and then we can combine them on a db.run val combinedAction = for { someResult <- action anotherResult <- anotherAction } yeild (someResult,anotherResult) db.run(combinedAction) // that returns actual Future of the result type
Likewise, you can deal with lists and sequences, take a look here: http://slick.typesafe.com/doc/3.1.0-M1/dbio.html DBIO has some functions that allow you to combine a list of actions with one action.
I hope the idea is clear, if you have questions, you are nice to the comments.
source share