feat: add generator skip option for table columns
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
This commit is contained in:
parent
f9ed359785
commit
60ba05b6fb
5 changed files with 73 additions and 9 deletions
|
|
@ -217,6 +217,17 @@ func processTableSQLBuilder(fileTypes, dirPath string,
|
|||
return insertedRowAlias(dialect)
|
||||
},
|
||||
"golangComment": formatGolangComment,
|
||||
"columnList": func(columns []metadata.Column) string {
|
||||
names := []string{}
|
||||
for _, col := range columns {
|
||||
bc := tableSQLBuilder.Column(col)
|
||||
if bc.Skip {
|
||||
continue
|
||||
}
|
||||
names = append(names, bc.Name+"Column")
|
||||
}
|
||||
return strings.Join(names, ", ")
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to generate table sql builder type %s: %w", tableSQLBuilder.TypeName, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue