added a check for skipping generation of table SQL builder code
This commit is contained in:
parent
a792fe6e0a
commit
882d5562f3
3 changed files with 41 additions and 5 deletions
|
|
@ -71,16 +71,20 @@ func processTableSQLBuilderSetSchema(dirPath string, schemaMetadata metadata.Sch
|
|||
return
|
||||
}
|
||||
|
||||
fmt.Println("Generating global `SetSchema` method...")
|
||||
|
||||
err := utils.EnsureDirPath(dirPath)
|
||||
throw.OnError(err)
|
||||
|
||||
var builders []TableSQLBuilder
|
||||
for _, tm := range schemaMetadata.TablesMetaData {
|
||||
builders = append(builders, builderTemplate.Table(tm))
|
||||
table := builderTemplate.Table(tm)
|
||||
builders = append(builders, table)
|
||||
|
||||
if table.Skip {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println("Generating global `SetSchema` method...")
|
||||
schemaIdentifier := utils.ToGoIdentifier(schemaMetadata.Name)
|
||||
|
||||
funcPath := path.Join(dirPath, builders[0].Path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue