|
|
|
@ -51,7 +51,7 @@ |
|
|
|
<script> |
|
|
|
import vueJsonEditor from "vue-json-editor"; |
|
|
|
import { Parser } from "sql-ddl-to-json-schema"; |
|
|
|
import shell from "shelljs"; |
|
|
|
import { exec } from "child_process"; |
|
|
|
export default { |
|
|
|
name: "HelloWorld", |
|
|
|
components: { vueJsonEditor }, |
|
|
|
@ -146,11 +146,15 @@ export default { |
|
|
|
|
|
|
|
const si = this.sqlinput; |
|
|
|
console.log("si:", si); |
|
|
|
var process = shell.exec(`jsongen -i "${si}"`); |
|
|
|
if (process.code !== 0) { |
|
|
|
console.log("process code error: " + process.code); |
|
|
|
} |
|
|
|
var gorminfo = process.stdout; |
|
|
|
var gorminfo = ``; |
|
|
|
|
|
|
|
exec(`jsongen -i "${si}"`, function (er, stdout, stderr) { |
|
|
|
if (er) { |
|
|
|
console.log("error exec jsongen:", er); |
|
|
|
return false; |
|
|
|
} |
|
|
|
gorminfo = stdout; |
|
|
|
}); |
|
|
|
console.log("gorminfo: ", gorminfo); |
|
|
|
|
|
|
|
const requires = v.required; |
|
|
|
|