English | 简体中文

api-docs / me.liuwj.ktorm.schema / DoubleSqlType

DoubleSqlType

object DoubleSqlType : SqlType<Double> (source code)

SqlType implementation represents double SQL type.

Inherited Properties

NameSummary

typeCode

val typeCode: Int

a constant value defined in java.sql.Types to identify JDBC types.

typeName

val typeName: String

the name of the type in specific databases, such as int, bigint, varchar, etc.

Functions

NameSummary

doGetResult

fun doGetResult(rs: ResultSet, index: Int): Double?

Obtain a result from a given ResultSet by index, the result may be null.

doSetParameter

fun doSetParameter(
    ps: PreparedStatement,
    index: Int,
    parameter: Double
): Unit

Set the parameter to a given PreparedStatement, the parameter can’t be null.

Inherited Functions

NameSummary

equals

open fun equals(other: Any?): Boolean

Indicates whether some other object is “equal to” this SQL type.
Two SQL types are equal if they have the same type codes and names.

getResult

fun getResult(rs: ResultSet, index: Int): T?

Obtain a result from a given ResultSet by index.

fun getResult(rs: ResultSet, columnLabel: String): T?

Obtain a result from a given ResultSet by columnLabel.

hashCode

open fun hashCode(): Int

Return a hash code value for this SQL type.

setParameter

fun setParameter(
    ps: PreparedStatement,
    index: Int,
    parameter: T?
): Unit

Set the nullable parameter to a given PreparedStatement.

transform

fun <R : Any> transform(
    fromUnderlyingValue: (T) -> R,
    toUnderlyingValue: (R) -> T
): SqlType<R>

Transform this SqlType to another. The returned SqlType has the same typeCode and typeName as the
underlying one, and performs the specific transformations on column values.