mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
handle null sql iso8601, kitchen time and simple date column values
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user