klyn.data.sql.internal.SQLValueReader.read
method
public static read(rows as ResultSet, index as Int, targetType as Type) as Object:
Description

Reads and converts one column without silent narrowing.

Parameters
ParameterDescription
rowsResult set positioned on the row to read.
indexOne-based SQL column index.
targetTypeExact Klyn type required by the entity mapping.
Returns

The converted value, or null for an SQL NULL.

Throws
  • ValueException if the SQL text is invalid for a supported primitive type.
  • EntityMappingException if no exact converter exists for targetType.
Example
value = SQLValueReader.read(rows, 1, Int.type)