You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
586 B

package system
import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/system/response"
)
type Database interface {
GetDB() (data []response.Db, err error)
GetTables(dbName string) (data []response.Table, err error)
GetColumn(tableName string, dbName string) (data []response.Column, err error)
}
func (autoCodeService *AutoCodeService) Database() Database {
switch global.GVA_CONFIG.System.DbType {
case "mysql":
return AutoCodeMysql
case "pgsql":
return AutoCodePgsql
default:
return AutoCodeMysql
}
}