Skip to content

Commit

Permalink
fallback to default implementation of IColumnType.readObject method…
Browse files Browse the repository at this point in the history
… only if `columnType` is unknown (not if its actual implementation of this method returned `null`) (#1452)
naftalmm authored Feb 19, 2022
1 parent 5dad809 commit d776ca5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -88,7 +88,8 @@ class ResultRow(
fun create(rs: ResultSet, fieldsIndex: Map<Expression<*>, Int>): ResultRow {
return ResultRow(fieldsIndex).apply {
fieldsIndex.forEach { (field, index) ->
val value = (field as? Column<*>)?.columnType?.readObject(rs, index + 1) ?: rs.getObject(index + 1)
val columnType = (field as? Column<*>)?.columnType
val value = if (columnType != null) columnType.readObject(rs, index + 1) else rs.getObject(index + 1)
data[index] = value
}
}

0 comments on commit d776ca5

Please sign in to comment.