class DatabaseAccess
Establishes a connection to the database specified in the config, and maintains a connection pool to that database.
<init> |
Establishes a connection to the database specified in the config, and maintains a connection pool to that database. DatabaseAccess(config: JsonObject, vertx: Vertx) |
getConnection |
Get a connection to the database. suspend fun <T : Any> getConnection(dbAction: suspend (SqlClient) -> T?): T |
getTransaction |
Get a transactional connection to the database. On success the transaction is committed. On error the transaction is rolled back. suspend fun <T : Any> getTransaction(dbAction: suspend (SqlClient) -> T?): T |