ResultSetParser

An object used to convert ResultSet to desired objects

Functions

Link copied to clipboard
fun <T : Any> parseToList(resultSet: ResultSet, clazz: Class<T>): List<T>

Get columns' values of all rows as a list of DTOs of type clazz, then close ResultSet

Link copied to clipboard
fun <T : Any> parseToObject(resultSet: ResultSet, clazz: Class<T>): T?

Get columns' values of the first row as a DTO of type clazz, then close ResultSet

Link copied to clipboard
fun <T : Any> parseToScalar(resultSet: ResultSet): T?

Get value of the first column of the first row, then close ResultSet