Get mysql schema
This commit is contained in:
parent
76ac28f550
commit
ab5b8716c0
|
@ -39,6 +39,7 @@ const SCHEMA: Integration = {
|
|||
features: {
|
||||
[DatasourceFeature.CONNECTION_CHECKING]: true,
|
||||
[DatasourceFeature.FETCH_TABLE_NAMES]: true,
|
||||
[DatasourceFeature.EXPORT_SCHEMA]: true,
|
||||
},
|
||||
datasource: {
|
||||
host: {
|
||||
|
@ -324,6 +325,14 @@ class MySQLIntegration extends Sql implements DatasourcePlus {
|
|||
await this.disconnect()
|
||||
}
|
||||
}
|
||||
|
||||
async getExternalSchema() {
|
||||
const [result] = await this.internalQuery({
|
||||
sql: `SHOW CREATE DATABASE ${this.config.database}`,
|
||||
})
|
||||
const schema = result["Create Database"]
|
||||
return schema
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
|
|
Loading…
Reference in New Issue