ent/schema: rename nullable to nillable

Reviewed By: idoshveki

Differential Revision: D16687892

fbshipit-source-id: e8cfaaf1241e94c2de0a9fe9077326339d593716
This commit is contained in:
Ariel Mashraki
2019-08-07 06:53:00 -07:00
committed by Facebook Github Bot
parent 25f5a2ef01
commit 619b63d5f7
41 changed files with 736 additions and 710 deletions

View File

@@ -7,7 +7,7 @@ func ({{ $receiver }} *{{ $.Name }}) FromRows(rows *sql.Rows) error {
var {{ $scan }} struct {
ID {{ if $.ID.IsString }}int{{ else }}{{ $.ID.Type }}{{ end }}
{{ range $_, $f := $.Fields }}
{{- pascal $f.Name }} {{ if or $f.Nullable $f.Optional }}{{ $f.NullType }}{{ else }}{{ $f.Type }}{{ end }}
{{- pascal $f.Name }} {{ if or $f.Nillable $f.Optional }}{{ $f.NullType }}{{ else }}{{ $f.Type }}{{ end }}
{{ end }}
}
// the order here should be the same as in the `{{ $.Package }}.Columns`.
@@ -21,7 +21,7 @@ func ({{ $receiver }} *{{ $.Name }}) FromRows(rows *sql.Rows) error {
}
{{ $receiver }}.ID = {{ if $.ID.IsString }}strconv.Itoa({{ $scan }}.ID){{ else }}{{ $scan }}.ID{{ end }}
{{- range $_, $f := $.Fields }}
{{- if $f.Nullable }}
{{- if $f.Nillable }}
{{- if $f.IsTime }}
{{ $receiver }}.{{ pascal $f.Name }} = &{{ $scan }}.{{ pascal $f.Name }}
{{- else }}