fetchFields

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

Executes the query and returns the first column of every row, mapped to T.

Declare T nullable when the column can be SQL NULLfetchFields<String?>().

Return

The first column of all matching rows; empty when nothing matched.

Parameters

params

Values by parameter name, without the leading @.

Type Parameters

T

The type the column is mapped to.

Throws

REQUIRED_ATTRIBUTE_MISSING if a value is NULL and T is not nullable.


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

Same as fetchFields, with the values given as Pairs.