English | 简体中文

api-docs / me.liuwj.ktorm.schema / BaseTable / ColumnRegistration

ColumnRegistration

inner class ColumnRegistration<C : Any, E : Any> : 
    ReadOnlyProperty<BaseTable<E>, Column<C>>
(source code)

Wrap a new registered column, providing more operations, such as configure a binding, mark it as
the primary key, and so on.

This class implements the ReadOnlyProperty interface, so it can be used as a property delegate,
and the delegate returns the registered column. For example:

val foo by registerColumn("foo", IntSqlType)

Here, the registerColumn function returns a ColumnRegistration<Int> and the foo property’s
type is Column<Int>.

Constructors

NameSummary

<init>

ColumnRegistration(columnName: String)

Wrap a new registered column, providing more operations, such as configure a binding, mark it as
the primary key, and so on.

Properties

NameSummary

columnName

val columnName: String

Functions

NameSummary

getColumn

fun getColumn(): Column<C>

Return the registered column.

getValue

operator fun getValue(
    thisRef: BaseTable<E>,
    property: KProperty<*>
): Column<C>

Return the registered column.