mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
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:
committed by
Facebook Github Bot
parent
1cf3c3a117
commit
4b176495e8
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user