1
0
Fork 0
mirror of synced 2024-07-06 15:00:49 +12:00

Get mysql schema

This commit is contained in:
Adria Navarro 2023-06-19 14:57:39 +01:00
parent 76ac28f550
commit ab5b8716c0

View file

@ -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 {