MCPcopy Index your code
hub / github.com/simstudioai/sim / buildColumnTypeMap

Function buildColumnTypeMap

apps/sim/lib/table/sql.ts:56–58  ·  view source on GitHub ↗

* Maps a column's **stable id** (the JSONB storage key, via `getColumnId`) to * its type. Filter/sort objects arrive keyed by column id, so the lookups in the * clause builders use ids — not display names.

(columns: ColumnDefinition[])

Source from the content-addressed store, hash-verified

54 * clause builders use ids — not display names.
55 */
56function buildColumnTypeMap(columns: ColumnDefinition[]): ColumnTypeMap {
57 return new Map(columns.map((col) => [getColumnId(col), col.type]))
58}
59
60/**
61 * Whitelist of allowed operators for query filtering.

Callers 2

buildFilterClauseFunction · 0.85
buildSortClauseFunction · 0.85

Calls 1

getColumnIdFunction · 0.90

Tested by

no test coverage detected