(statement: string)
| 163 | } |
| 164 | |
| 165 | function renderRun(statement: string) { |
| 166 | const lines = statement.replaceAll("\t", " ").split("\n") |
| 167 | if (lines.length === 1) return ` yield* tx.run(\`${escapeTemplate(lines[0])}\`)` |
| 168 | return ` yield* tx.run(\`\n${lines.map((line) => ` ${escapeTemplate(line)}`).join("\n")}\n \`)` |
| 169 | } |
| 170 | |
| 171 | function escapeTemplate(line: string) { |
| 172 | return line.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("${", "\\${") |
nothing calls this directly
no test coverage detected