hi, if I want to make a direct JDBC stored proc ca...
# ktor
m
hi, if I want to make a direct JDBC stored proc call, do I have to run it as a suspend function managed by a thread pool? I saw an example in Exposed Github repo that uses
Copy code
suspend fun <T> dbQuery(block: suspend () -> T): T =
        newSuspendedTransaction(Dispatchers.IO) { block() }
Can I pass non Exposed API call block such as
jdbi.withHandle(h->h.insert("sql").mapToInt().one()
a
What context do you need to make the direct JDBC stored proc call in?
m
I did not quite understand the question. I am trying to understand how do I manage my JDBC calls (without using Exposed). I guess all JDBC calls are blocked calls, and I want to confirm if I should code those calls as suspend functions managed under a different thread pool.
a
I think yes, in the context of the route's handlers.