English | 简体中文

api-docs / org.ktorm.support.postgresql / CubeSqlType

CubeSqlType

object CubeSqlType : SqlType<Cube> (source code)

Represents a Cube by storing 2 n-dimensional points
Part of PostgreSQL’s cube SQL extension.
https://www.postgresql.org/docs/9.5/cube.html

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): Cube?

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

doSetParameter

fun doSetParameter(
    ps: PreparedStatement,
    index: Int,
    parameter: Cube
): 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

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

Obtain a result from a given ResultSet by index.

open 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

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

Set the nullable parameter to a given PreparedStatement.

transform

open 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.

Extension Functions

NameSummary

eq

infix fun <T : Any> T.eq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Equal operator, translated to = in SQL.

neq

infix fun <T : Any> T.neq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.

notEq

infix fun <T : Any> T.notEq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.