MCPcopy
hub / github.com/simstudioai/sim / deriveOutputColumnName

Function deriveOutputColumnName

apps/sim/lib/table/column-naming.ts:30–38  ·  view source on GitHub ↗
(path: string, taken: Set<string>)

Source from the content-addressed store, hash-verified

28 * path slug; on collision, appends `_0`, `_1`, …
29 */
30export function deriveOutputColumnName(path: string, taken: Set<string>): string {
31 const base = slugifyColumnName(path)
32 if (!taken.has(base)) return base
33 for (let i = 0; i < 1000; i++) {
34 const candidate = `${base}_${i}`
35 if (!taken.has(candidate)) return candidate
36 }
37 return `${base}_${Date.now()}`
38}
39
40/**
41 * Map a block-output leaf type onto a table column type. Block schemas use

Callers 5

executeFunction · 0.90
EnrichmentConfigFunction · 0.90
handleSaveFunction · 0.90
handleSaveFunction · 0.90
addWorkflowGroupOutputFunction · 0.85

Calls 1

slugifyColumnNameFunction · 0.85

Tested by

no test coverage detected