add support for all int types in schema

Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/8

Reviewed By: alexsn

Differential Revision: D16131257

fbshipit-source-id: 7b362740053c684f70ec69188b2fcee898605436
This commit is contained in:
Ariel Mashraki
2019-07-10 08:30:42 -07:00
committed by Facebook Github Bot
parent 1cf3c3a117
commit 4b176495e8
60 changed files with 10170 additions and 101 deletions

View File

@@ -15,7 +15,7 @@ func ({{ $receiver }} *{{ $builder }}) sqlSave(ctx context.Context) (*{{ $.Name
{{- range $_, $f := $.Fields }}
if {{ $receiver }}.{{- $f.StructField }} != nil {
builder.Set({{ $.Package }}.{{ $f.Constant }}, *{{ $receiver }}.{{ $f.StructField }})
{{ if $f.Nullable }}*{{ end }}{{ $.Receiver }}.{{ pascal $f.Name }} = *{{ $receiver }}.{{ $f.StructField }}
{{ $.Receiver }}.{{ pascal $f.Name }} = {{ if not $f.Nullable }}*{{ end }}{{ $receiver }}.{{ $f.StructField }}
}
{{- end }}
query, args := builder.Query()