MCPcopy Create free account
hub / github.com/TabularisDB/tabularis / formatSqlPreview

Function formatSqlPreview

src/utils/sqlHighlight.tsx:45–50  ·  view source on GitHub ↗
(sql: string, maxLines = 3)

Source from the content-addressed store, hash-verified

43}
44
45export function formatSqlPreview(sql: string, maxLines = 3): string {
46 const lines = sql.split("\n").map((l) => l.trim()).filter(Boolean);
47 const preview = lines.slice(0, maxLines).join("\n");
48 if (lines.length > maxLines) return preview + " ...";
49 return preview;
50}

Callers 2

QueryHistorySectionFunction · 0.90
SqlHighlightFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected