mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 09:25:59 +00:00
20 lines
525 B
JavaScript
20 lines
525 B
JavaScript
const { SqlDumper, arrayToHexString } = require('dbgate-tools');
|
|
|
|
class Dumper extends SqlDumper {
|
|
autoIncrement() {}
|
|
|
|
renameSqlObject(obj, newname) {
|
|
this.putCmd('^alter %k %f ^rename ^to %i', this.getSqlObjectSqlName(obj.objectTypeField), obj, newname);
|
|
}
|
|
|
|
renameTable(obj, newname) {
|
|
this.putCmd('^alter ^table %f ^rename ^to %i', obj, newname);
|
|
}
|
|
|
|
renameColumn(column, newcol) {
|
|
this.putCmd('^alter ^table %f ^rename %i ^to %i', column, column.columnName, newcol);
|
|
}
|
|
}
|
|
|
|
module.exports = Dumper;
|