Dominick
08/25/2023, 12:33 PMfun Column<Long>.transformInstant(): ColumnWithTransform<Long, Instant> =
this.transform({ it.toEpochMilli() }, { Instant.ofEpochMilli(it) })
I'm forced to import a specific Table, like import <package>.data.accounts.Account.Companion.transform
Is there a built-in Instant transform, or do I really need to tie this extension to a specific table?Andrew O'Hara
08/25/2023, 1:51 PMfun Column<Long>.epochInstant() = ColumnWithTransform(
column = this,
toReal = Instant::ofEpochSecond,
toColumn = Instant::getEpochSecond
)
Andrew O'Hara
08/25/2023, 2:14 PMexposed-java-time
module to add support for java.time. But I don't think it supports epoch format.Dominick
08/25/2023, 2:48 PM