api-docs / org.ktorm.database / use
use
inline fun <T : AutoCloseable?, R> T.use(block: (T) -> R): R
(source code)Execute the given block function on this resource and then close it down correctly whether an exception
is thrown or not.
Parameters
block
- a function to process this AutoCloseable resource.
Return
the result of block function invoked on this resource.