fetchFieldStrict

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

Executes the query and returns the first column of its single row, requiring exactly one row.

Strict governs how many rows came back, not whether the value is NULL: a NULL under a nullable T is still returned as null here.

Return

The value.

Parameters

params

Values by parameter name, without the leading @.

Type Parameters

T

The type the column is mapped to.

Throws

INCORRECT_RESULT_SIZE if no row or more than one row matched.

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


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

Same as fetchFieldStrict, with the values given as Pairs.