mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 00:16:00 +00:00
data duplicator works in simple case
This commit is contained in:
@@ -57,6 +57,10 @@ export class ScriptWriter {
|
||||
this._put(`await dbgateApi.importDatabase(${JSON.stringify(options)});`);
|
||||
}
|
||||
|
||||
dataDuplicator(options) {
|
||||
this._put(`await dbgateApi.dataDuplicator(${JSON.stringify(options)});`);
|
||||
}
|
||||
|
||||
comment(s) {
|
||||
this._put(`// ${s}`);
|
||||
}
|
||||
@@ -143,6 +147,13 @@ export class ScriptWriterJson {
|
||||
});
|
||||
}
|
||||
|
||||
dataDuplicator(options) {
|
||||
this.commands.push({
|
||||
type: 'dataDuplicator',
|
||||
options,
|
||||
});
|
||||
}
|
||||
|
||||
getScript(schedule = null) {
|
||||
return {
|
||||
type: 'json',
|
||||
@@ -186,6 +197,9 @@ export function jsonScriptToJavascript(json) {
|
||||
case 'importDatabase':
|
||||
script.importDatabase(cmd.options);
|
||||
break;
|
||||
case 'dataDuplicator':
|
||||
script.dataDuplicator(cmd.options);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user