← Back to Stormify Documentation

addRawColumn

fun addRawColumn(expression: String, type: Column.Type = Column.Type.TEXT): Column

Adds a raw/custom column backed by an arbitrary SQL expression.

Return

The created column

Parameters

expression

The SQL expression (e.g., "SUM(amount)", "COALESCE(a, b)")

type

The column type, which determines how filter values are interpreted. Defaults to Column.Type.TEXT.


fun addRawColumn(expression: String, type: Column.Type, sqlGenerator: SqlGenerator): Column

Adds a raw/custom column with a custom SQL generator. The sqlGenerator receives the column expression and the user's filter value, and returns a SQL fragment while staging bind parameters via SqlArgsCollector.