n8n/packages/cli/src/utils/sql.ts
Guillaume Jacquart cb5a803f9e
feat(core): Store insights data at the end of executions (no-changelog) (#13905)
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2025-03-20 20:25:29 +01:00

18 lines
407 B
TypeScript

/**
* Provides syntax highlighting for embedded SQL queries in template strings.
*/
export function sql(strings: TemplateStringsArray, ...values: string[]): string {
let result = '';
// Interleave the strings with the values
for (let i = 0; i < values.length; i++) {
result += strings[i];
result += values[i];
}
// Add the last string
result += strings[strings.length - 1];
return result;
}