(sql: string, maxLines = 3)
| 43 | } |
| 44 | |
| 45 | export 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 | } |
no outgoing calls
no test coverage detected