Slick has DBIO.seq and DBIO.sequence for running many DBIOActions whereby the results of previous actions aren't required for subsequent actions.
I've looked at the source, and it's not obvious to me if DBIO.seq runs the actions sequentially. On the other hand, DBIO.fold has a very simple implementation which definitely does run the actions sequentially, as it just uses flatMap internally.
My question is: will order be guaranteed when using seq and sequence, like it is with fold?
The documentation states that the actions in
DBIO.seqare run sequentially:Also, in the source code for
DBIO.seq, you will see thatSynchronousDatabaseActionis called insideforeach, which means that each are sequantially and (internally) synchronously called without any parallel run.