← Back to Stormify Documentation

addColumn

fun addColumn(vararg fieldPaths: String): Column

Adds a column with one or more field paths. The column type is auto-detected from the field's Kotlin type. Multiple paths use OR logic for filtering.

Field paths use dot notation for foreign-key traversal: "contactPerson.firstName".

Return

The created column

Parameters

fieldPaths

One or more field paths (dot notation)


fun addColumn(type: Column.Type, vararg fieldPaths: String): Column

Adds a column with an explicit type override. Use this when the auto-detected type (based on the field's Kotlin type) is not what you want — for example, to treat a string zip-code column as numeric.


fun addColumn(enumValues: Map<String, Any>, vararg fieldPaths: String): Column

Adds an ENUM column with a custom display-name-to-DB-value map. Use this when the field is not a Kotlin enum but logically represents one (e.g., a status integer column with human-readable labels), or to override the auto-built map for a real enum field. The Map first argument distinguishes this overload from the scalar-typed variants at compile time.


fun addColumn(vararg paths: ScalarPath): Column

Adds a column using type-safe KSP-generated path objects.


fun addColumn(type: Column.Type, vararg paths: ScalarPath): Column

Explicit-type variant of addColumn using typed paths.


fun addColumn(enumValues: Map<String, Any>, vararg paths: ScalarPath): Column

Enum-column variant using typed paths — same rules as the Map + String overload.