toObject

fun <T : Any> ResultSet.toObject(clazz: KClass<T>): T?

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

Return

null if there is no rows

Throws

on invalid mapping

from JDBC