Permalink
Browse files

AndThen and Seq continuations

  • Loading branch information...
hvesalai committed Jan 16, 2018
1 parent f0776fb commit 4fd92897a19648a247d0bc30bf0845bd64570244
Showing with 3 additions and 2 deletions.
  1. +3 −2 slick/src/main/scala/slick/basic/BasicBackend.scala
@@ -148,7 +148,8 @@ trait BasicBackend { self =>
case AndThenAction(actions) =>
val last = actions.length - 1
def run(pos: Int, v: Any): Future[Any] = {
val f1 = runInContext(actions(pos), ctx, streaming && pos == last, pos == 0)
val f1 = runInContext(actions(pos), ctx, streaming && pos == last, topLevel && pos == 0)
if(pos == last) f1
else f1.flatMap(run(pos + 1, _))(DBIO.sameThreadExecutionContext)
}
@@ -166,7 +167,7 @@ trait BasicBackend { self =>
}
b.result()
}
else runInContext(actions(pos), ctx, false, pos == 0).flatMap { (v: Any) =>
else runInContext(actions(pos), ctx, false, topLevel && pos == 0).flatMap { (v: Any) =>
results.set(pos, v)
run(pos + 1)
} (DBIO.sameThreadExecutionContext)

0 comments on commit 4fd9289

Please sign in to comment.