English | 简体中文

api-docs / org.ktorm.schema / BaseTable / registerColumn

registerColumn

fun <C : Any> registerColumn(
    name: String,
    sqlType: SqlType<C>
): Column<C>
(source code)

Register a column to this table with the given name and sqlType.

This function returns the registered column, we can perform more modifications to the column such as configure
a binding, mark it as a primary key, and so on. But please note that Column is immutable, those modification
functions will create new Column instances and replace the origin registered ones.