← Back to Stormify Documentation

addSqlFacet

fun addSqlFacet(alias: String, expression: String, type: Facet.Type = Facet.Type.TEXT): Facet

Adds a raw/custom column backed by an arbitrary SQL expression (e.g. "SUM(amount)", "COALESCE(a, b)"). The expression is emitted verbatim, so it is the configurator's responsibility to make it safe and dialect-compatible — it is never derived from user input.


fun addSqlFacet(alias: String, expression: String, type: Facet.Type, converter: Converter): Facet

Raw column with a custom Converter for filter semantics.