mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 06:46:00 +00:00
feat: dumper data type handling
This commit is contained in:
committed by
Nybkox
parent
bcf89b1f09
commit
09fa3ce438
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user