← Back to Stormify Documentation

castToDate

fun castToDate(placeholder: String): String

Wraps a bind placeholder with a dialect-specific cast to DATE. Used by raw facets with onl.ycode.stormify.biglist.Facet.Type.DATE 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 — the caller should pass a value that matches the storage

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