Remove swaths of metadata for tables in templates
This commit is contained in:
parent
ad1b588fd4
commit
180fbb0b8c
2 changed files with 1 additions and 6 deletions
|
@ -4,12 +4,7 @@ var (
|
|||
{{$varNameSingular}}Columns = []string{{"{"}}{{.Table.Columns | columnNames | stringMap .StringFuncs.quoteWrap | join ", "}}{{"}"}}
|
||||
{{$varNameSingular}}ColumnsWithoutDefault = []string{{"{"}}{{.Table.Columns | filterColumnsByDefault false | columnNames | stringMap .StringFuncs.quoteWrap | join ","}}{{"}"}}
|
||||
{{$varNameSingular}}ColumnsWithDefault = []string{{"{"}}{{.Table.Columns | filterColumnsByDefault true | columnNames | stringMap .StringFuncs.quoteWrap | join ","}}{{"}"}}
|
||||
{{$varNameSingular}}ColumnsWithSimpleDefault = []string{{"{"}}{{.Table.Columns | filterColumnsBySimpleDefault | columnNames | stringMap .StringFuncs.quoteWrap | join ", "}}{{"}"}}
|
||||
{{$varNameSingular}}ValidatedColumns = []string{{"{"}}{{.Table.Columns | filterColumnsByValidated | columnNames | stringMap .StringFuncs.quoteWrap | join ", "}}{{"}"}}
|
||||
{{$varNameSingular}}UniqueColumns = []string{{"{"}}{{.Table.Columns | filterColumnsByUnique | columnNames | stringMap .StringFuncs.quoteWrap | join ", "}}{{"}"}}
|
||||
{{$varNameSingular}}PrimaryKeyColumns = []string{{"{"}}{{.Table.PKey.Columns | stringMap .StringFuncs.quoteWrap | join ", "}}{{"}"}}
|
||||
{{$varNameSingular}}AutoIncrementColumns = []string{{"{"}}{{.Table.Columns | filterColumnsByAutoIncrement true | columnNames | stringMap .StringFuncs.quoteWrap | join "," }}{{"}"}}
|
||||
{{$varNameSingular}}AutoIncPrimaryKeys = []string{{"{"}}{{.Table.Columns | filterColumnsByDefault true | columnNames | setIntersect .Table.PKey.Columns | stringMap .StringFuncs.quoteWrap | join ","}}{{"}"}}
|
||||
)
|
||||
|
||||
type (
|
||||
|
|
|
@ -68,7 +68,7 @@ func Test{{$tableNamePlural}}SliceUpdateAll(t *testing.T) {
|
|||
// Remove Primary keys and unique columns from what we plan to update
|
||||
fields := strmangle.SetComplement(
|
||||
{{$varNameSingular}}Columns,
|
||||
strmangle.SetMerge({{$varNameSingular}}PrimaryKeyColumns, {{$varNameSingular}}UniqueColumns),
|
||||
{{$varNameSingular}}PrimaryKeyColumns,
|
||||
)
|
||||
|
||||
value := reflect.Indirect(reflect.ValueOf({{$varNameSingular}}))
|
||||
|
|
Loading…
Reference in a new issue