PostgreSQL export to SQL and XML bytea contents #1228

This commit is contained in:
Stela Augustinova
2025-10-29 12:22:13 +01:00
parent c741434e3c
commit aa7fb74312
5 changed files with 39 additions and 6 deletions

View File

@@ -45,6 +45,10 @@ class StringifyStream extends stream.Transform {
elementValue(element, value) {
this.startElement(element);
if (value?.$binary?.base64) {
const buffer = Buffer.from(value.$binary.base64, 'base64');
value = '0x' +buffer.toString('hex').toUpperCase();
}
this.push(escapeXml(`${value}`));
this.endElement(element);
}