func support
支持 函数导出。支持外键关联
This commit is contained in:
@@ -18,6 +18,7 @@ var mysqlInfo config.MysqlDbInfo
|
||||
var outDir string
|
||||
var singularTable bool
|
||||
var foreignKey bool
|
||||
var funcKey bool
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "main",
|
||||
@@ -60,6 +61,9 @@ func init() {
|
||||
rootCmd.PersistentFlags().BoolVarP(&foreignKey, "foreign", "f", false, "是否导出外键关联")
|
||||
rootCmd.MarkFlagRequired("foreign key")
|
||||
|
||||
rootCmd.PersistentFlags().BoolVarP(&funcKey, "fun", "F", false, "是否导出函数")
|
||||
rootCmd.MarkFlagRequired("func export")
|
||||
|
||||
rootCmd.Flags().IntVar(&mysqlInfo.Port, "port", 3306, "端口号")
|
||||
}
|
||||
|
||||
@@ -110,4 +114,8 @@ func MergeMysqlDbInfo() {
|
||||
if foreignKey {
|
||||
config.SetForeignKey(foreignKey)
|
||||
}
|
||||
|
||||
if funcKey {
|
||||
config.SetIsOutFunc(funcKey)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user