check.go 466 字节
Newer Older
Y
Your Name 已提交
1 2 3
package updater

import (
Y
Your Name 已提交
4 5 6 7 8
	"github.com/eolinker/goku-api-gateway/common/pdao"
	"github.com/eolinker/goku-api-gateway/server/dao"
)
var (
	updaterDao dao.UpdaterDao
Y
Your Name 已提交
9 10
)

Y
Your Name 已提交
11 12 13
func init() {
	pdao.Need(&updaterDao)
}
Y
Your Name 已提交
14 15
//IsTableExist 检查table是否存在
func IsTableExist(name string) bool {
Y
Your Name 已提交
16
	return updaterDao.IsTableExist(name)
Y
Your Name 已提交
17 18 19 20
}

//IsColumnExist 检查列是否存在
func IsColumnExist(name string, column string) bool {
Y
Your Name 已提交
21
	return updaterDao.IsColumnExist(name, column)
Y
Your Name 已提交
22
}