mirror of
https://github.com/dbgate/dbgate
synced 2024-11-08 12:47:25 +00:00
21 lines
434 B
JavaScript
21 lines
434 B
JavaScript
const SqlDumper = require('../default/SqlDumper');
|
|
|
|
class MsSqlDumper extends SqlDumper {
|
|
autoIncrement() {
|
|
this.put(' ^identity');
|
|
}
|
|
|
|
putStringValue(value) {
|
|
if (/[^\u0000-\u00ff]/.test(value)) {
|
|
this.putRaw('N');
|
|
}
|
|
super.putStringValue(value);
|
|
}
|
|
|
|
allowIdentityInsert(table, allow) {
|
|
this.putCmd("^set ^identity_insert %f %k;&n", table, allow ? "on" : "off");
|
|
}
|
|
}
|
|
|
|
module.exports = MsSqlDumper;
|