← Back to Stormify Documentation

castToDate

fun castToDate(placeholder: String): String

Wraps a bind placeholder with a dialect-specific cast to DATE. Used by raw columns with onl.ycode.stormify.biglist.Column.Type.TEMPORAL where the DB cannot implicitly convert an ISO string bind parameter to a date.

  • Oracle: TO_DATE(?, 'YYYY-MM-DD') — Oracle ignores CAST(? AS DATE) for strings

  • SQLite: no cast needed — SQLite stores dates as epoch ms, but the caller should pass a typed value (epoch ms or ISO string) that matches the storage

  • others: CAST(? AS DATE) — standard SQL