api-docs / org.ktorm.schema / Column
Column
data class Column<T : Any> : ColumnDeclaring<T>
(source code)Represents database columns.
Constructors
Name | Summary |
---|---|
Column( Represents database columns. |
Properties
Name | Summary |
---|---|
val allBindings: List<ColumnBinding> Return all the bindings of this column, including the primary binding and extraBindings. | |
val binding: ColumnBinding? The column’s primary binding. A column might be bound to a simple property, nested properties, | |
val extraBindings: List<ColumnBinding> The column’s extra bindings. Useful when we need to configure two or more bindings for a column. | |
val label: String The column’s label, used to identify the selected columns and to obtain query results. | |
val name: String The column’s name. | |
val referenceTable: BaseTable<*>? If the column is bound to a reference table, return the table, otherwise return null. | |
The SqlType of this column or expression. | |
val table: BaseTable<*> The table that this column belongs to. |
Functions
Name | Summary |
---|---|
fun aliased(label: String?): ColumnDeclaringExpression<T> Wrap this column as a ColumnDeclaringExpression. | |
fun asExpression(): ColumnExpression<T> Convert this column to a ColumnExpression. | |
Indicates whether some other object is “equal to” this column. | |
fun hashCode(): Int Return a hash code value for this column. | |
fun toString(): String Return a string representation of this column. | |
fun wrapArgument(argument: T?): ArgumentExpression<T> Wrap the given argument as an ArgumentExpression using the sqlType. |
Extension Functions
Name | Summary |
---|---|
infix fun ColumnDeclaring<Boolean>.and( infix fun ColumnDeclaring<Boolean>.and( And operator, translated to the | |
fun ColumnDeclaring<*>.asc(): OrderByExpression Order this column or expression in ascending order. | |
fun <T : Any> ColumnDeclaring<*>.cast( Cast the current column or expression to the given SqlType. | |
fun ColumnDeclaring<HStore>.containedIn( fun ColumnDeclaring<HStore>.containedIn( HStore contained-in operator, translated to the <@ operator in PostgreSQL. | |
fun ColumnDeclaring<Cube>.contains( fun ColumnDeclaring<Cube>.contains( fun ColumnDeclaring<Cube>.contains( fun ColumnDeclaring<Cube>.contains( Cube contains operator, translated to the @> operator in PostgreSQL. fun ColumnDeclaring<HStore>.contains( fun ColumnDeclaring<HStore>.contains( HStore contains operator, translated to the @> operator in PostgreSQL. | |
fun ColumnDeclaring<HStore>.containsAll( fun ColumnDeclaring<HStore>.containsAll( HStore contains-all-keys operator, translated to the ?& operator in PostgreSQL. | |
fun ColumnDeclaring<HStore>.containsAny( fun ColumnDeclaring<HStore>.containsAny( HStore contains-any-keys operator, translated to the ?| operator in PostgreSQL. | |
fun ColumnDeclaring<HStore>.containsKey( fun ColumnDeclaring<HStore>.containsKey( HStore contains-key operator, translated to the ? operator in PostgreSQL. | |
fun <T : Any> Column<T>.defaultValue(): DefaultValueExpression<T> Return a default value for this column, see DefaultValueExpression. | |
fun <T : Any> Column<T>.defaultValue(): DefaultValueExpression<T> Return a default value for this column, see DefaultValueExpression. | |
fun ColumnDeclaring<*>.desc(): OrderByExpression Order this column or expression in descending order, corresponding to the | |
infix operator fun <T : Number> ColumnDeclaring<T>.div( infix operator fun <T : Number> ColumnDeclaring<T>.div( Divide operator, translated to | |
infix fun <T : Any> ColumnDeclaring<T>.eq( infix fun <T : Any> ColumnDeclaring<T>.eq( infix fun <T : Any> T.eq( Equal operator, translated to | |
operator fun ColumnDeclaring<HStore>.get( operator fun ColumnDeclaring<HStore>.get( HStore get-value-for-key operator, translated to the -> operator in PostgreSQL. operator fun ColumnDeclaring<HStore>.get( operator fun ColumnDeclaring<HStore>.get( HStore get-values-for-keys operator, translated to the -> operator in PostgreSQL. | |
fun <T : Any> ColumnDeclaring<T>.ifNull( fun <T : Any> ColumnDeclaring<T>.ifNull( MySQL ifnull function, translated to | |
fun <T : Any> ColumnDeclaring<T>.ifNull( fun <T : Any> ColumnDeclaring<T>.ifNull( SQLite ifnull function, translated to | |
infix fun ColumnDeclaring<*>.ilike( infix fun ColumnDeclaring<*>.ilike( ILike operator, translated to the | |
fun <T : Any> ColumnDeclaring<T>.inList( infix fun <T : Any> ColumnDeclaring<T>.inList( infix fun ColumnDeclaring<*>.inList( In-list operator, translated to the | |
fun ColumnDeclaring<String>.instr( fun ColumnDeclaring<String>.instr( SQLite instr function, translated to | |
fun ColumnDeclaring<*>.isNotNull(): UnaryExpression<Boolean> Check if the current column or expression is not null, translated to | |
fun ColumnDeclaring<*>.isNull(): UnaryExpression<Boolean> Check if the current column or expression is null, translated to | |
fun <T : Any> Column<List<T>>.jsonContains( MySQL json_contains function, translated to | |
fun <T : Any> Column<*>.jsonExtract( MySQL json_extract function, translated to | |
fun <T : Any> ColumnDeclaring<*>.jsonExtract( SQLite json_extract function, translated to | |
fun ColumnDeclaring<*>.jsonPatch( SQLite json_patch function, translated to | |
fun ColumnDeclaring<*>.jsonRemove( SQLite json_remove function, translated to | |
fun ColumnDeclaring<*>.jsonValid(): FunctionExpression<Boolean> SQLite json_valid function, translated to | |
infix fun ColumnDeclaring<*>.like( infix fun ColumnDeclaring<*>.like( Like operator, translated to the | |
infix operator fun <T : Number> ColumnDeclaring<T>.minus( infix operator fun <T : Number> ColumnDeclaring<T>.minus( Minus operator, translated to | |
operator fun ColumnDeclaring<HStore>.minus( operator fun ColumnDeclaring<HStore>.minus( HStore delete-key operator, translated to the - operator in PostgreSQL. operator fun ColumnDeclaring<HStore>.minus( operator fun ColumnDeclaring<HStore>.minus( HStore delete-keys operator, translated to the - operator in PostgreSQL. operator fun ColumnDeclaring<HStore>.minus( operator fun ColumnDeclaring<HStore>.minus( HStore delete-matching-pairs operator, translated to the - operator in PostgreSQL. | |
infix fun <T : Any> ColumnDeclaring<T>.neq( infix fun <T : Any> ColumnDeclaring<T>.neq( infix fun <T : Any> T.neq( Not-equal operator, translated to | |
operator fun ColumnDeclaring<Boolean>.not(): UnaryExpression<Boolean> Negative operator, translated to the | |
infix fun <T : Any> ColumnDeclaring<T>.notEq( infix fun <T : Any> ColumnDeclaring<T>.notEq( infix fun <T : Any> T.notEq( Not-equal operator, translated to | |
fun <T : Any> ColumnDeclaring<T>.notInList( infix fun <T : Any> ColumnDeclaring<T>.notInList( infix fun ColumnDeclaring<*>.notInList( Not-in-list operator, translated to the | |
infix fun ColumnDeclaring<*>.notLike( infix fun ColumnDeclaring<*>.notLike( Not like operator, translated to the | |
infix fun ColumnDeclaring<Boolean>.or( infix fun ColumnDeclaring<Boolean>.or( Or operator, translated to the | |
fun ColumnDeclaring<Cube>.overlaps( fun ColumnDeclaring<Cube>.overlaps( Cube overlap operator, translated to the && operator in PostgreSQL. | |
infix operator fun <T : Number> ColumnDeclaring<T>.plus( infix operator fun <T : Number> ColumnDeclaring<T>.plus( Plus operator, translated to | |
operator fun ColumnDeclaring<HStore>.plus( operator fun ColumnDeclaring<HStore>.plus( HStore concatenate operator, translated to the || operator in PostgreSQL. | |
infix operator fun <T : Number> ColumnDeclaring<T>.rem( infix operator fun <T : Number> ColumnDeclaring<T>.rem( Mod operator, translated to | |
infix operator fun <T : Number> ColumnDeclaring<T>.times( infix operator fun <T : Number> ColumnDeclaring<T>.times( Multiply operator, translated to | |
fun ColumnDeclaring<out Number>.toDouble(): CastingExpression<Double> Cast the current column or expression’s type to Double. | |
fun ColumnDeclaring<out Number>.toFloat(): CastingExpression<Float> Cast the current column or expression’s type to Float. | |
fun ColumnDeclaring<out Number>.toLong(): CastingExpression<Long> Cast the current column or expression’s type to Long. | |
fun ColumnDeclaring<out Number>.toShort(): CastingExpression<Short> Cast the current column or expression’s type to Short. | |
operator fun <T : Number> ColumnDeclaring<T>.unaryMinus(): UnaryExpression<T> Unary minus operator, translated to | |
operator fun <T : Number> ColumnDeclaring<T>.unaryPlus(): UnaryExpression<T> Unary plus operator, translated to | |
infix fun ColumnDeclaring<Boolean>.xor( infix fun ColumnDeclaring<Boolean>.xor( Xor operator, translated to the |