transform
fun <Unwrapped, Wrapped> Column<Unwrapped>.transform(transformer: ColumnTransformer<Unwrapped, Wrapped>): EntityFieldWithTransform<Unwrapped, Wrapped>
Returns an EntityFieldWithTransform delegate that transforms this stored Unwrapped value on every read.
Parameters
transformer
An instance of ColumnTransformer to handle the transformations.
fun <Unwrapped, Wrapped> Column<Unwrapped>.transform(unwrap: (Wrapped) -> Unwrapped, wrap: (Unwrapped) -> Wrapped): EntityFieldWithTransform<Unwrapped, Wrapped>
Returns an EntityFieldWithTransform delegate that transforms this stored Unwrapped value on every read.
Parameters
unwrap
A pure function that converts a transformed value to a value that can be stored in this original column type.
wrap
A pure function that transforms a value stored in this original column type.
fun <TColumn, Unwrapped, Wrapped> EntityFieldWithTransform<TColumn, Unwrapped>.transform(unwrap: (Wrapped) -> Unwrapped, wrap: (Unwrapped) -> Wrapped): EntityFieldWithTransform<TColumn, Wrapped>
Returns an EntityFieldWithTransform that extends transformation of an existing EntityFieldWithTransform.
Parameters
unwrap
A function that transforms the value to the wrapping type of the previously defined transformation.
wrap
A function that transforms the value to the wrapping type.