get

inline fun <T> get(index: Int): T

Returns the field at index, cast to T.

A record is anonymous, so fields are reachable by position only - there are no names to ask by.

Return

The field value.

Parameters

index

Zero-based index in the order the record's columns were selected.

Type Parameters

T

The expected field type. Declare it nullable to accept a SQL NULL.

Throws

COLUMN_NOT_FOUND if index is outside this record's fields, CONVERSION_ERROR if the value is null under a non-nullable T, or is not a T.