fetchObjects

inline fun <T : Any> fetchObjects(params: Map<String, Any?>): List<T>

Executes the query and maps every row onto T.

Each row is treated as an anonymous record and handed to the result converters, so T can be a data class, a Map<String, Any?>, or anything a registered converter produces.

Return

All matching rows, mapped; empty when nothing matched.

Parameters

params

Values by parameter name, without the leading @.

Type Parameters

T

The type each row is mapped to.

Throws

if a row cannot be mapped onto T.


inline fun <T : Any> fetchObjects(vararg params: Pair<String, Any?>): List<T>

Same as fetchObjects, with the values given as Pairs.