feat: dumper data type handling

This commit is contained in:
SPRINX0\prochazka
2025-01-23 15:47:13 +01:00
committed by Nybkox
parent bcf89b1f09
commit 09fa3ce438
6 changed files with 39 additions and 6 deletions

View File

@@ -22,6 +22,18 @@ class Dumper extends SqlDumper {
dropColumn(column) {
this.putCmd('^alter ^table %f ^drop %i', column, column.columnName);
}
putValue(value, dataType) {
if (
dataType?.toLowerCase() === 'uuid' &&
value.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/)
) {
this.putRaw(value);
return;
}
super.putValue(value);
}
}
module.exports = Dumper;