Allow setting nil to pgtype.Bool
This commit is contained in:
@@ -13,6 +13,11 @@ type Bool struct {
|
||||
}
|
||||
|
||||
func (dst *Bool) Set(src interface{}) error {
|
||||
if src == nil {
|
||||
*dst = Bool{Status: Null}
|
||||
return nil
|
||||
}
|
||||
|
||||
switch value := src.(type) {
|
||||
case bool:
|
||||
*dst = Bool{Bool: value, Status: Present}
|
||||
|
||||
Reference in New Issue
Block a user