I have a questions about Slick 3 Transactions
I want to run a series of delete rows, and check that each delete succeeded. If any fail I want to roll back the entire transactions
Here is some pseudo Slick code:
val action = DBIO.seq(
TableQuery[X].filter(_.x===a).delete,
TableQuery[Y].filter(_.y===b).delete,
TableQuery[Z].filter(_.z===c).delete
).transactionally
database.run(action)
In this case each of the deletes should remove an existing row. If any does not in fact find a row to remove, I want the whole transaction to roll back.
What is the idiom to do this in Slick?
Thanks in advance Peter