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:
parent
b8be0b742d
commit
8137dd1388
@ -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)
|
||||||
|
}
|
||||||
|
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user