From f35ff7c2ebd4f0442f4494dcd519f0333d5c744a Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 19 Nov 2021 12:32:55 +0800 Subject: [PATCH] Make SQLType2Type support uint (#2071) Reviewed-on: https://gitea.com/xorm/xorm/pulls/2071 Co-authored-by: Lunny Xiao Co-committed-by: Lunny Xiao --- schemas/type.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/schemas/type.go b/schemas/type.go index d192bac6..8702862a 100644 --- a/schemas/type.go +++ b/schemas/type.go @@ -332,6 +332,10 @@ func SQLType2Type(st SQLType) reflect.Type { return IntType case BigInt, BigSerial: return Int64Type + case UnsignedBit, UnsignedTinyInt, UnsignedSmallInt, UnsignedMediumInt, UnsignedInt: + return UintType + case UnsignedBigInt: + return Uint64Type case Float, Real: return Float32Type case Double: