Remove rune to text conversion
Because rune is an alias for int32 this caused some very surprising results. e.g. inserting int32(65) into text would insert "A" instead of "65".
This commit is contained in:
@@ -28,8 +28,6 @@ func (EnumCodec) PlanEncode(m *Map, oid uint32, format int16, value any) EncodeP
|
||||
return encodePlanTextCodecString{}
|
||||
case []byte:
|
||||
return encodePlanTextCodecByteSlice{}
|
||||
case rune:
|
||||
return encodePlanTextCodecRune{}
|
||||
case TextValuer:
|
||||
return encodePlanTextCodecTextValuer{}
|
||||
}
|
||||
@@ -48,8 +46,6 @@ func (c *EnumCodec) PlanScan(m *Map, oid uint32, format int16, target any) ScanP
|
||||
return scanPlanAnyToNewByteSlice{}
|
||||
case TextScanner:
|
||||
return &scanPlanTextAnyToEnumTextScanner{codec: c}
|
||||
case *rune:
|
||||
return scanPlanTextAnyToRune{}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user