Skip to content

Commit 2e2ab58

Browse files
Merge pull request #564 from AlexRiedler/reduce-allocation-on-label
fix: reduce memory allocation on Column.label used for accessing in query
2 parents 1377e38 + 8360f33 commit 2e2ab58

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

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

123123
/**
124124
* Return all the bindings of this column, including the primary [binding] and [extraBindings].

0 commit comments

Comments
 (0)