mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: add support for ValueScanner for bytes type (#524)
This commit is contained in:
@@ -822,6 +822,10 @@ func (f Field) BasicType(ident string) (expr string) {
|
||||
case rt.TypeEqual(nullBoolType):
|
||||
expr = fmt.Sprintf("%s.Bool", ident)
|
||||
}
|
||||
case field.TypeBytes:
|
||||
if rt.Kind == reflect.Slice {
|
||||
expr = fmt.Sprintf("[]byte(%s)", ident)
|
||||
}
|
||||
case field.TypeTime:
|
||||
switch {
|
||||
case rt.Kind == reflect.Bool:
|
||||
|
||||
Reference in New Issue
Block a user