← Back to Stormify Documentation

castToTimestamp

fun castToTimestamp(placeholder: String): String

Wraps a bind placeholder with a dialect-specific cast to the datetime type. Used by raw facets with onl.ycode.stormify.biglist.Facet.Type.TIMESTAMP.

  • Oracle: TO_TIMESTAMP(?, 'YYYY-MM-DD"T"HH24:MI:SS').

  • SQLite: passthrough.

  • MySQL / MariaDB: CAST(? AS DATETIME)TIMESTAMP is not a valid CAST target in these dialects.

  • MSSQL: CAST(? AS DATETIME2)TIMESTAMP in SQL Server is a rowversion, not a datetime.

  • PostgreSQL, H2, others: CAST(? AS TIMESTAMP).