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.
This issue has been automatically marked as stale because it has been open 360 days with no activity. Remove stale label or comment or this will be closed in 180 days
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