ConvertSchemaDslInternal

Functions

Link copied to clipboard
abstract fun <A, B> convert(from: KType, to: KType, converter: (A) -> B)

Defines how to convert from: A to to: B.

Link copied to clipboard
inline fun <reified C> ConvertSchemaDsl<*>.convert(): ConvertType<C>

Defines how to convert values of the given type C.

Link copied to clipboard
abstract fun convertIf(condition: (fromType: KType, toSchema: ColumnSchema) -> Boolean, converter: ConverterScope.(Any?) -> Any?)

Advanced version of convert. If you want to define a common conversion for multiple types (or any type), or you need extra information about the target, such as its schema, use this method.

Link copied to clipboard
abstract fun <C> fill(columns: ColumnsSelector<*, C>, expr: RowExpression<*, C>)
Link copied to clipboard
inline fun <T, reified C> ConvertSchemaDsl<T>.fill(noinline columns: ColumnsSelector<T, C>): ConvertToFill<T, C>

Defines how to fill all specified columns in the destination schema that were not found in the original dataframe. All fill operations for missing columns are executed after successful conversion of matched columns, so converted values of matched columns can be safely used in with expression.

Link copied to clipboard
inline fun <reified C> ConvertSchemaDsl<*>.parser(noinline parser: (String) -> C)

Defines how to convert String values into the given type C.