mysql字段为UNSIGNED时,会导致字段类型无法识别,返回RawBytes

This commit is contained in:
fanshengshuai 2023-02-28 16:43:37 +08:00
parent 056cecc97e
commit 8f5fb72e37
1 changed files with 1 additions and 0 deletions

View File

@ -738,6 +738,7 @@ func (p *mysqlDriver) Parse(driverName, dataSourceName string) (*URI, error) {
}
func (p *mysqlDriver) GenScanResult(colType string) (interface{}, error) {
colType = strings.Replace(colType, "UNSIGNED ", "", -1)
switch colType {
case "CHAR", "VARCHAR", "TINYTEXT", "TEXT", "MEDIUMTEXT", "LONGTEXT", "ENUM", "SET":
var s sql.NullString