Morning everyone, just got a new blog post up abou...
# jasync-sql
h
Morning everyone, just got a new blog post up about implementing transactions with jasync-sql and Ktor, would love any feedback and hopefully someone finds it useful https://henrycourse.com/2020/11/21/jasync-sql-transactions/
👏 1
o
Thanks for the post! I have a couple of minor suggestions: • if you add a usage example it will be nice and easier to grasp for readers, • Maybe add a link to complete code in github? • Have you checked SuspendingConnection? It might help with some of the things you did: https://github.com/jasync-sql/jasync-sql/blob/master/db-async-common/src/main/java/com/github/jasync/sql/db/SuspendingConnection.kt and https://github.com/jasync-sql/jasync-sql/wiki/Kotlin-API#kotlin-coroutines-support
h
thanks a lot for the feedback, all good points and will check out suspending connections tomorrow!
Thanks for the heads up on this, I see that the
SuspendingConnection
uses the pool's dispatcher (if the
connection
is a pool) when executing queries in a transaction. I overlooked that which might lead to some unexpected behaviour