(sql: Prisma.Sql)
| 47 | } |
| 48 | |
| 49 | export function unwrapSQL(sql: Prisma.Sql) { |
| 50 | const unwrapSqlText = sql.text.replace(/\$(\d+)/g, (match, group1) => { |
| 51 | const index = parseInt(group1, 10) - 1; |
| 52 | return `'${sql.values[index]}'`; |
| 53 | }); |
| 54 | |
| 55 | return unwrapSqlText; |
| 56 | } |
| 57 | |
| 58 | export function printSQL(sql: Prisma.Sql) { |
| 59 | const unwrapSqlText = unwrapSQL(sql); |
no test coverage detected