diff --git a/core/reflect.go b/core/reflect.go index 2277202..949c11c 100644 --- a/core/reflect.go +++ b/core/reflect.go @@ -300,7 +300,7 @@ func makeColumnValue(name string, columnType *sql.ColumnType) func() (ptrValue i return nil } } - case "varchar", "char", "text", "tinytext", "longtext": + case "varchar", "char", "text", "tinytext", "longtext", "character varying", "character": //if nullable, ok := columnType.Nullable() return func() (ptrValue interface{}, valueGet func() interface{}) { @@ -312,6 +312,18 @@ func makeColumnValue(name string, columnType *sql.ColumnType) func() (ptrValue i return nil } } + case "boolean", "bool", "bit": + //if nullable, ok := columnType.Nullable() + + return func() (ptrValue interface{}, valueGet func() interface{}) { + var value sql.NullBool + return &value, func() interface{} { + if value.Valid { + return value.Bool + } + return nil + } + } } t := columnType.ScanType()