mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
ent/schema: rename nullable to nillable
Reviewed By: idoshveki Differential Revision: D16687892 fbshipit-source-id: e8cfaaf1241e94c2de0a9fe9077326339d593716
This commit is contained in:
committed by
Facebook Github Bot
parent
25f5a2ef01
commit
619b63d5f7
@@ -8,6 +8,7 @@
|
||||
{{ define "dialect/sql/predicate/id/ops" -}}
|
||||
{{- $op := $.Scope.Op -}}
|
||||
{{- $arg := $.Scope.Arg -}}
|
||||
{{- $storage := $.Scope.Storage -}}
|
||||
func(s *sql.Selector) {
|
||||
{{- if $op.Variadic }}
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
@@ -23,7 +24,7 @@
|
||||
{{- else if $.ID.IsString }}
|
||||
id, _ := strconv.Atoi({{ $arg }})
|
||||
{{- end }}
|
||||
s.Where(sql.{{ $op.Name }}(s.C({{ $.ID.Constant }}), {{ if $op.Variadic }}v...{{ else }}id{{ end }}))
|
||||
s.Where(sql.{{ call $storage.OpCode $op }}(s.C({{ $.ID.Constant }}), {{ if $op.Variadic }}v...{{ else }}id{{ end }}))
|
||||
}
|
||||
{{- end }}
|
||||
|
||||
@@ -38,6 +39,7 @@
|
||||
{{- $f := $.Scope.Field -}}
|
||||
{{- $op := $.Scope.Op -}}
|
||||
{{- $arg := $.Scope.Arg -}}
|
||||
{{- $storage := $.Scope.Storage -}}
|
||||
func(s *sql.Selector) {
|
||||
{{- if $op.Variadic }}
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
@@ -47,7 +49,7 @@
|
||||
return
|
||||
}
|
||||
{{- end }}
|
||||
s.Where(sql.{{ $op.Name }}(s.C({{ $f.Constant }}){{ if not $op.Niladic }}, v{{ if $op.Variadic }}...{{ end }}{{ end }}))
|
||||
s.Where(sql.{{ call $storage.OpCode $op }}(s.C({{ $f.Constant }}){{ if not $op.Niladic }}, v{{ if $op.Variadic }}...{{ end }}{{ end }}))
|
||||
}
|
||||
{{- end }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user