mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
handle null sql iso8601, kitchen time and simple date column values
This commit is contained in:
parent
226a4cb064
commit
ad2ec68c34
|
@ -104,6 +104,8 @@ func (t *ISO8601) Scan(src interface{}) error {
|
|||
return err
|
||||
}
|
||||
*t = tt
|
||||
case nil:
|
||||
*t = ISO8601(time.Time{})
|
||||
default:
|
||||
return fmt.Errorf("ISO8601: unknown type of: %T", v)
|
||||
}
|
||||
|
|
|
@ -100,6 +100,8 @@ func (t *KitckenTime) Scan(src interface{}) error {
|
|||
return err
|
||||
}
|
||||
*t = tt
|
||||
case nil:
|
||||
*t = KitckenTime(time.Time{})
|
||||
default:
|
||||
return fmt.Errorf("KitckenTime: unknown type of: %T", v)
|
||||
}
|
||||
|
|
|
@ -105,6 +105,8 @@ func (t *SimpleDate) Scan(src interface{}) error {
|
|||
return err
|
||||
}
|
||||
*t = tt
|
||||
case nil:
|
||||
*t = SimpleDate(time.Time{})
|
||||
default:
|
||||
return fmt.Errorf("SimpleDate: unknown type of: %T", v)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user