Skip to content

Commit

Permalink
entc/gen: minor cleaning to codegen (#3377)
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m committed Mar 9, 2023
1 parent 3d41cfd commit 546789b
Show file tree
Hide file tree
Showing 190 changed files with 1,170 additions and 4,680 deletions.
5 changes: 1 addition & 4 deletions entc/gen/template/dialect/sql/update.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,7 @@ func ({{ $receiver }} *{{ $builder }}) sqlSave(ctx context.Context) ({{ $ret }}
Columns: {{ if $e.M2M }}{{ $.Package }}.{{ $e.PKConstant }}{{ else }}[]string{ {{ $.Package }}.{{ $e.ColumnConstant }} }{{ end }},
Bidi: {{ $e.Bidi }},
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.{{ $e.Type.ID.Type.ConstName }},
Column: {{ $e.Type.Package }}.{{ $e.Type.ID.Constant }},
},
IDSpec: sqlgraph.NewFieldSpec({{ $e.Type.Package }}.{{ $e.Type.ID.Constant }}, field.{{ $e.Type.ID.Type.ConstName }}),
},
}
{{- /* Allow mutating the sqlgraph.EdgeSpec by ent extensions or user templates.*/}}
Expand Down
5 changes: 1 addition & 4 deletions entc/integration/cascadelete/ent/comment_create.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 4 additions & 16 deletions entc/integration/cascadelete/ent/comment_update.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions entc/integration/cascadelete/ent/post_create.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 10 additions & 40 deletions entc/integration/cascadelete/ent/post_update.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions entc/integration/cascadelete/ent/user_create.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 6 additions & 24 deletions entc/integration/cascadelete/ent/user_update.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions entc/integration/customid/ent/account_create.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 6 additions & 24 deletions entc/integration/customid/ent/account_update.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 546789b

Please sign in to comment.