gorm icon indicating copy to clipboard operation
gorm copied to clipboard

The mysql bit(1) data type to Golang bool data type is supported

Open duktig666 opened this issue 3 years ago • 0 comments

Describe the feature

The mysql bit(1) data type to Golang bool data type is supported

希望 gorm 可以支持 mysql 的bit(1) 数据类型转为 golang的bool数据类型。

Motivation

The current GORM can only convert Golang []byte using mysql bit(1). But all aspects are not as good as bool. '[]byte{0}' '[]byte{0}' is relatively unfriendly to use and readability. For Java MyBatis, you can convert it to a Boolean, which is a good reference. Hope to support.

目前的 gorm 使用 mysql bit(1) 只能转为 golang 的 []byte比较合理。但是各方面并不如 bool 来的好用。 []byte{0} []byte{0} 相对来说,使用性、可读性还是不够友好。 对于java的mybatis来说,可以将其转为boolean,这一点来说,可以借鉴。 希望支持。

Related Issues

duktig666 avatar Sep 27 '22 08:09 duktig666