1
0
mirror of https://github.com/ManyakRus/crud_generator.git synced 2024-12-13 21:42:33 +02:00

сделал MassOmit string

This commit is contained in:
Nikitin Aleksandr 2024-11-28 17:52:26 +03:00
parent b8be0b742d
commit 8137dd1388

View File

@ -291,6 +291,20 @@ func AddTextOmit(TextDB string, Table1 *types.Table) string {
MassOmit = append(MassOmit, ColumnName) MassOmit = append(MassOmit, ColumnName)
} }
`
} else if TypeGo == "string" && (Column1.TableKey != "" || is_nullable_config == true) {
NullableCount = NullableCount + 1
TextFind := `if m.` + ColumnNameGo + ` == "" {`
pos1 := strings.Index(TextDB, TextFind)
if pos1 >= 0 {
continue
}
TextOmit = TextOmit + "\t" + `ColumnName = "` + ColumnNameGo + `"
if m.` + ColumnNameGo + ` == "" {
MassOmit = append(MassOmit, ColumnName)
}
` `
} }