transform

Deprecated

This function was replaced with more general alternative on DSL layer. DAOs transform() is deprecated and will be removed in future releases. Please use the transform function from the DSL layer. Please log a request on YouTrack (https://youtrack.jetbrains.com/newIssue?project=EXPOSED) if a use-case cannot be sufficiently covered by the DSL transform().

Replace with

object : Table() { val c = column().transform(transformer) }

Returns a EntityFieldWithTransform delegate that transforms this stored Unwrapped value on every read.

Parameters

transformer

An instance of ColumnTransformer to handle the transformations.

Samples

org.jetbrains.exposed.sql.tests.shared.entities.TransformationsTableorg.jetbrains.exposed.sql.tests.shared.entities.TransformationEntity

Deprecated

This function was replaced with more general alternative on DSL layer. DAOs transform() is deprecated and will be removed in future releases. Please use the transform function from the DSL layer. Please log a request on YouTrack (https://youtrack.jetbrains.com/newIssue?project=EXPOSED) if a use-case cannot be sufficiently covered by the DSL transform().

Replace with

object : Table() { val c = column().transform(wrap, unwrap) }

Returns a 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.

Samples

org.jetbrains.exposed.sql.tests.shared.entities.TransformationsTableorg.jetbrains.exposed.sql.tests.shared.entities.TransformationEntity

Deprecated

This function was replaced with more general alternative on DSL layer. DAOs transform() is deprecated and will be removed in future releases. Please use the transform function from the DSL layer. Please log a request on YouTrack (https://youtrack.jetbrains.com/newIssue?project=EXPOSED) if a use-case cannot be sufficiently covered by the DSL transform().

Replace with

object : Table() { val c = column().transform(wrap, unwrap) }

Returns a EntityFieldWithTransform that extends transformation of existing EntityFieldWithTransform.

Parameters

unwrap

A function that transforms the value to the wrapping type of previously defined transformation

wrap

A function that transforms value to the wrapping type

Samples

org.jetbrains.exposed.sql.tests.shared.entities.TransformationsTableorg.jetbrains.exposed.sql.tests.shared.entities.TransformationEntity