mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-07-15 01:17:20 +02:00
cb5a803f9e
Co-authored-by: Danny Martini <danny@n8n.io> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
18 lines
407 B
TypeScript
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;
|
|
}
|