mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 14:56:01 +00:00
SYNC: charts auto detect
This commit is contained in:
@@ -139,6 +139,19 @@ class Dumper extends SqlDumper {
|
||||
this.endCommand();
|
||||
}
|
||||
}
|
||||
|
||||
putValue(value, dataType) {
|
||||
const dataLower = dataType?.toLowerCase();
|
||||
if (dataLower?.includes('date')) {
|
||||
if (typeof value == 'string') {
|
||||
this.putRaw("'");
|
||||
this.putRaw(this.escapeString(value.replace(/(?:Z|[+-]\d{2}:?\d{2})$/, '')));
|
||||
this.putRaw("'");
|
||||
return;
|
||||
}
|
||||
}
|
||||
super.putValue(value, dataType);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Dumper;
|
||||
|
||||
@@ -375,6 +375,11 @@ const mysqlDriverBase = {
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
adaptDataType(dataType) {
|
||||
if (dataType?.toLowerCase() == 'money') return 'decimal(15,2)';
|
||||
return dataType;
|
||||
},
|
||||
};
|
||||
|
||||
/** @type {import('dbgate-types').EngineDriver} */
|
||||
|
||||
Reference in New Issue
Block a user