feat: get table info

This commit is contained in:
zhuyasen
2024-11-24 15:05:26 +08:00
parent 21272aee58
commit e3b6e11e6b
7 changed files with 287 additions and 56 deletions

View File

@@ -40,6 +40,8 @@ type Args struct {
NoNullType bool
NullStyle string
IsExtendedAPI bool // true: generate extended api (9 api), false: generate basic api (5 api)
IsCustomTemplate bool // whether to use custom template, default is false
}
func (a *Args) checkValid() error {
@@ -181,6 +183,9 @@ func setOptions(args *Args) []parser.Option {
if args.IsExtendedAPI {
opts = append(opts, parser.WithExtendedAPI())
}
if args.IsCustomTemplate {
opts = append(opts, parser.WithCustomTemplate())
}
return opts
}