MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / formatCellDefault

Function formatCellDefault

console/src/platform/shell/formatRows.ts:131–141  ·  view source on GitHub ↗
(cell: unknown)

Source from the content-addressed store, hash-verified

129}
130
131function formatCellDefault(cell: unknown) {
132 if (typeof cell === "string") {
133 return cell;
134 } else if (Array.isArray(cell)) {
135 return formatArray(cell);
136 } else {
137 // TODO: handle record types (represented here as JavaScript objects) as
138 // psql does. psql only renders `jsonb` data as JSON.
139 return JSON.stringify(cell);
140 }
141}

Callers 1

formatRowsFunction · 0.85

Calls 1

formatArrayFunction · 0.85

Tested by

no test coverage detected