db9010 / com.jovial.db9010 / ValueAdapterNotNull

ValueAdapterNotNull

abstract class ValueAdapterNotNull<T> : ValueAdapter<T>

Abstract superclass for all value adapters of non-nullable types. This provides an implementation of a method that creates a value adapter of the corresponding nullable type.

Constructors

<init>

Abstract superclass for all value adapters of non-nullable types. This provides an implementation of a method that creates a value adapter of the corresponding nullable type.

ValueAdapterNotNull()

Properties

javaSqlTypesTypeOrFail

Give the java.sql.Types type of this adapter if it is an adapter for nullable types. If it is not, fail with an IllegalArgumentException. This value is needed when setting a value to null. See PreparedStatement.setNull

open val javaSqlTypesTypeOrFail: Int

Functions

get

Get the column at index in set.

open fun get(set: ResultSet, index: Int): T

getOrNull

Get the column at index in set, returning a nullable value.

abstract fun getOrNull(set: ResultSet, index: Int): T?

nullable

Create a nullable version of this ValueAdapter. For this, we need the java.sql.Types type, which is an integer constant, because PreparedStatement.setNull demands it.

fun nullable(javaSqlTypesType: Int): ValueAdapter<T?>