package eu.kanade.data import com.squareup.sqldelight.ColumnAdapter import java.util.* val dateAdapter = object : ColumnAdapter { override fun decode(databaseValue: Long): Date = Date(databaseValue) override fun encode(value: Date): Long = value.time } private const val listOfStringsSeparator = ", " val listOfStringsAdapter = object : ColumnAdapter, String> { override fun decode(databaseValue: String) = if (databaseValue.isEmpty()) { listOf() } else { databaseValue.split(listOfStringsSeparator) } override fun encode(value: List) = value.joinToString(separator = listOfStringsSeparator) }