Skip to content

Commit bd9990f

Browse files
init Column's properties when constructing the instance
1 parent 493aa76 commit bd9990f

File tree

1 file changed

+3
-3
lines changed
  • ktorm-core/src/main/kotlin/org/ktorm/schema

1 file changed

+3
-3
lines changed

ktorm-core/src/main/kotlin/org/ktorm/schema/Column.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,19 @@ public data class Column<T : Any>(
118118
*
119119
* @see ColumnDeclaringExpression
120120
*/
121-
val label: String by lazy { toString(separator = "_") }
121+
val label: String = toString(separator = "_")
122122

123123
/**
124124
* Return all the bindings of this column, including the primary [binding] and [extraBindings].
125125
*/
126-
val allBindings: List<ColumnBinding> get() = binding?.let { listOf(it) + extraBindings } ?: emptyList()
126+
val allBindings: List<ColumnBinding> = binding?.let { listOf(it) + extraBindings } ?: emptyList()
127127

128128
/**
129129
* If the column is bound to a reference table, return the table, otherwise return null.
130130
*
131131
* Shortcut for `(binding as? ReferenceBinding)?.referenceTable`.
132132
*/
133-
val referenceTable: BaseTable<*>? get() = (binding as? ReferenceBinding)?.referenceTable
133+
val referenceTable: BaseTable<*>? = (binding as? ReferenceBinding)?.referenceTable
134134

135135
/**
136136
* Convert this column to a [ColumnExpression].

0 commit comments

Comments
 (0)