← Back to Stormify Documentation

read

fun <T : Any> read(baseClass: Class<T>, query: String, vararg params: Any?): List<T>

Executes a SELECT and returns the rows as a list of baseClass instances.


fun <T : Any> read(baseClass: Class<T>, query: String, customFields: Map<String, Consumer<Any?>>, vararg params: Any?): List<T>

Executes a SELECT and returns the rows, capturing values from columns named in customFields (e.g. COUNT(*) OVER () AS __total) via the supplied consumers — those columns are not mapped onto the entity. Column names are matched case-insensitively.