sqldelight-runtime / com.squareup.sqldelight / ColumnAdapter

ColumnAdapter

interface ColumnAdapter<T : Any, S>

Marshal and map the type T to and from a database type S which is one of Long, Double, String, byte[].

Functions

decode

abstract fun decode(databaseValue: S): T

encode

abstract fun encode(value: T): S

Inheritors

EnumColumnAdapter

class EnumColumnAdapter<T : Enum<T>> : ColumnAdapter<T, String>

A ColumnAdapter which maps the enum class T to a string in the database.