(value: string, engine: Engine)
| 250 | MYSQL_FAMILY_ENGINES.has(engine); |
| 251 | |
| 252 | const escapeSQLStringLiteral = (value: string, engine: Engine): string => { |
| 253 | let escaped = value; |
| 254 | // Escape backslashes first so the quote-doubling below isn't affected. |
| 255 | if (isMySQLFamilyEngine(engine)) { |
| 256 | escaped = escaped.replaceAll("\\", "\\\\"); |
| 257 | } |
| 258 | escaped = escaped.replaceAll("'", "''"); |
| 259 | return `'${escaped}'`; |
| 260 | }; |
| 261 | |
| 262 | const bytesToHex = (bytes: Uint8Array): string => |
| 263 | Array.from(bytes) |
no test coverage detected