aeruhxi
04/18/2018, 6:47 AMval likesCount = when(post) {
is None -> None
is Some ->
s.readTransactionAsync { tx ->
tx.runAsync(notificationQuery, parameters("postId", it.a))
.thenCompose(StatementResultCursor::peekAsync)
.thenApply { record ->
Some(record["likesCount"].asInt())
}
}.await()
}
hmm I did it this way... If there is a better way, please suggest