yjp 1 rok pred
rodič
commit
5cd1890265

+ 15 - 33
dpsv1/client.go

@@ -12,6 +12,7 @@ import (
 	"google.golang.org/grpc/credentials/insecure"
 	"io"
 	"reflect"
+	"strings"
 	"sync"
 	"time"
 )
@@ -800,21 +801,21 @@ func (c *Client) formTableRow(tableRow map[string]any) (*request.TableRow, error
 		case "int":
 			typedValue.TypedValue = &request.ColumnValue_Uint64Value{Uint64Value: uint64(value.(int))}
 		case "int8":
-			typedValue.TypedValue = &request.ColumnValue_Uint32Value{Uint32Value: uint32(value.(int8))}
+			typedValue.TypedValue = &request.ColumnValue_Uint64Value{Uint64Value: uint64(value.(int8))}
 		case "int16":
-			typedValue.TypedValue = &request.ColumnValue_Uint32Value{Uint32Value: uint32(value.(int16))}
+			typedValue.TypedValue = &request.ColumnValue_Uint64Value{Uint64Value: uint64(value.(int16))}
 		case "int32":
-			typedValue.TypedValue = &request.ColumnValue_Uint32Value{Uint32Value: uint32(value.(int32))}
+			typedValue.TypedValue = &request.ColumnValue_Uint64Value{Uint64Value: uint64(value.(int32))}
 		case "int64":
 			typedValue.TypedValue = &request.ColumnValue_Uint64Value{Uint64Value: uint64(value.(int64))}
 		case "uint":
 			typedValue.TypedValue = &request.ColumnValue_Uint64Value{Uint64Value: uint64(value.(uint))}
 		case "uint8":
-			typedValue.TypedValue = &request.ColumnValue_Uint32Value{Uint32Value: uint32(value.(uint8))}
+			typedValue.TypedValue = &request.ColumnValue_Uint64Value{Uint64Value: uint64(value.(uint8))}
 		case "uint16":
-			typedValue.TypedValue = &request.ColumnValue_Uint32Value{Uint32Value: uint32(value.(uint16))}
+			typedValue.TypedValue = &request.ColumnValue_Uint64Value{Uint64Value: uint64(value.(uint16))}
 		case "uint32":
-			typedValue.TypedValue = &request.ColumnValue_Uint32Value{Uint32Value: value.(uint32)}
+			typedValue.TypedValue = &request.ColumnValue_Uint64Value{Uint64Value: uint64(value.(uint32))}
 		case "uint64":
 			typedValue.TypedValue = &request.ColumnValue_Uint64Value{Uint64Value: value.(uint64)}
 		case "float32":
@@ -838,39 +839,20 @@ func (c *Client) infoDataToInfoMap(infoData *response.InfoData) (map[string]any,
 	retInfoMap := make(map[string]any)
 
 	for _, column := range infoData.Columns {
-		switch column.Value.Type {
-		case "Time":
+		typeStr := column.Value.Type
+
+		if typeStr == "Time" {
 			timeObj := time.Unix(0, int64(column.Value.GetUint64Value()))
 			retInfoMap[column.Name] = timeObj
-		case "string":
+		} else if typeStr == "string" {
 			retInfoMap[column.Name] = column.Value.GetStringValue()
-		case "bool":
+		} else if typeStr == "bool" {
 			retInfoMap[column.Name] = column.Value.GetBoolValue()
-		case "int":
-			retInfoMap[column.Name] = int(column.Value.GetUint64Value())
-		case "int8":
-			retInfoMap[column.Name] = int(column.Value.GetUint32Value())
-		case "int16":
-			retInfoMap[column.Name] = int(column.Value.GetUint32Value())
-		case "int32":
-			retInfoMap[column.Name] = int(column.Value.GetUint32Value())
-		case "int64":
-			retInfoMap[column.Name] = int64(column.Value.GetUint64Value())
-		case "uint":
-			retInfoMap[column.Name] = uint(column.Value.GetUint64Value())
-		case "uint8":
-			retInfoMap[column.Name] = uint(column.Value.GetUint32Value())
-		case "uint16":
-			retInfoMap[column.Name] = uint(column.Value.GetUint32Value())
-		case "uint32":
-			retInfoMap[column.Name] = uint(column.Value.GetUint32Value())
-		case "uint64":
+		} else if strings.Contains(typeStr, "int") {
 			retInfoMap[column.Name] = column.Value.GetUint64Value()
-		case "float32":
-			retInfoMap[column.Name] = float32(column.Value.GetFloat64Value())
-		case "float64":
+		} else if strings.Contains(typeStr, "float") {
 			retInfoMap[column.Name] = column.Value.GetFloat64Value()
-		default:
+		} else {
 			return nil, errors.New("不支持的数据类型" + column.Value.Type)
 		}
 	}

+ 14 - 32
pb/v1/request/command.pb.go

@@ -1465,7 +1465,6 @@ type ColumnValue struct {
 	// Types that are assignable to TypedValue:
 	//
 	//	*ColumnValue_StringValue
-	//	*ColumnValue_Uint32Value
 	//	*ColumnValue_Uint64Value
 	//	*ColumnValue_Float64Value
 	//	*ColumnValue_BoolValue
@@ -1532,13 +1531,6 @@ func (x *ColumnValue) GetStringValue() string {
 	return ""
 }
 
-func (x *ColumnValue) GetUint32Value() uint32 {
-	if x, ok := x.GetTypedValue().(*ColumnValue_Uint32Value); ok {
-		return x.Uint32Value
-	}
-	return 0
-}
-
 func (x *ColumnValue) GetUint64Value() uint64 {
 	if x, ok := x.GetTypedValue().(*ColumnValue_Uint64Value); ok {
 		return x.Uint64Value
@@ -1568,26 +1560,20 @@ type ColumnValue_StringValue struct {
 	StringValue string `protobuf:"bytes,3,opt,name=StringValue,proto3,oneof"`
 }
 
-type ColumnValue_Uint32Value struct {
-	Uint32Value uint32 `protobuf:"varint,4,opt,name=Uint32Value,proto3,oneof"`
-}
-
 type ColumnValue_Uint64Value struct {
-	Uint64Value uint64 `protobuf:"varint,5,opt,name=Uint64Value,proto3,oneof"`
+	Uint64Value uint64 `protobuf:"varint,4,opt,name=Uint64Value,proto3,oneof"`
 }
 
 type ColumnValue_Float64Value struct {
-	Float64Value float64 `protobuf:"fixed64,6,opt,name=Float64Value,proto3,oneof"`
+	Float64Value float64 `protobuf:"fixed64,5,opt,name=Float64Value,proto3,oneof"`
 }
 
 type ColumnValue_BoolValue struct {
-	BoolValue bool `protobuf:"varint,7,opt,name=BoolValue,proto3,oneof"`
+	BoolValue bool `protobuf:"varint,6,opt,name=BoolValue,proto3,oneof"`
 }
 
 func (*ColumnValue_StringValue) isColumnValue_TypedValue() {}
 
-func (*ColumnValue_Uint32Value) isColumnValue_TypedValue() {}
-
 func (*ColumnValue_Uint64Value) isColumnValue_TypedValue() {}
 
 func (*ColumnValue_Float64Value) isColumnValue_TypedValue() {}
@@ -1871,25 +1857,22 @@ var file_v1_request_command_proto_rawDesc = []byte{
 	0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18,
 	0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
 	0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x56, 0x61, 0x6c,
-	0x75, 0x65, 0x22, 0xf5, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x56, 0x61, 0x6c,
+	0x75, 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x56, 0x61, 0x6c,
 	0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
 	0x52, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02,
 	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0b, 0x53, 0x74,
 	0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48,
 	0x00, 0x52, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22,
-	0x0a, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20,
-	0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c,
-	0x75, 0x65, 0x12, 0x22, 0x0a, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75,
-	0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x36,
-	0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x24, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36,
-	0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0c,
-	0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x09,
-	0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48,
-	0x00, 0x52, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a,
-	0x54, 0x79, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x20, 0x5a, 0x1e, 0x64, 0x70,
-	0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x70,
-	0x62, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72,
-	0x6f, 0x74, 0x6f, 0x33,
+	0x0a, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c,
+	0x75, 0x65, 0x12, 0x24, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c,
+	0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0c, 0x46, 0x6c, 0x6f, 0x61,
+	0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c,
+	0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x42,
+	0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x54, 0x79, 0x70, 0x65,
+	0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x20, 0x5a, 0x1e, 0x64, 0x70, 0x73, 0x2f, 0x61, 0x70,
+	0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x31,
+	0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -2251,7 +2234,6 @@ func file_v1_request_command_proto_init() {
 	}
 	file_v1_request_command_proto_msgTypes[21].OneofWrappers = []interface{}{
 		(*ColumnValue_StringValue)(nil),
-		(*ColumnValue_Uint32Value)(nil),
 		(*ColumnValue_Uint64Value)(nil),
 		(*ColumnValue_Float64Value)(nil),
 		(*ColumnValue_BoolValue)(nil),

+ 14 - 32
pb/v1/response/query.pb.go

@@ -376,7 +376,6 @@ type ColumnValue struct {
 	// Types that are assignable to TypedValue:
 	//
 	//	*ColumnValue_StringValue
-	//	*ColumnValue_Uint32Value
 	//	*ColumnValue_Uint64Value
 	//	*ColumnValue_Float64Value
 	//	*ColumnValue_BoolValue
@@ -443,13 +442,6 @@ func (x *ColumnValue) GetStringValue() string {
 	return ""
 }
 
-func (x *ColumnValue) GetUint32Value() uint32 {
-	if x, ok := x.GetTypedValue().(*ColumnValue_Uint32Value); ok {
-		return x.Uint32Value
-	}
-	return 0
-}
-
 func (x *ColumnValue) GetUint64Value() uint64 {
 	if x, ok := x.GetTypedValue().(*ColumnValue_Uint64Value); ok {
 		return x.Uint64Value
@@ -479,26 +471,20 @@ type ColumnValue_StringValue struct {
 	StringValue string `protobuf:"bytes,3,opt,name=StringValue,proto3,oneof"`
 }
 
-type ColumnValue_Uint32Value struct {
-	Uint32Value uint32 `protobuf:"varint,4,opt,name=Uint32Value,proto3,oneof"`
-}
-
 type ColumnValue_Uint64Value struct {
-	Uint64Value uint64 `protobuf:"varint,5,opt,name=Uint64Value,proto3,oneof"`
+	Uint64Value uint64 `protobuf:"varint,4,opt,name=Uint64Value,proto3,oneof"`
 }
 
 type ColumnValue_Float64Value struct {
-	Float64Value float64 `protobuf:"fixed64,6,opt,name=Float64Value,proto3,oneof"`
+	Float64Value float64 `protobuf:"fixed64,5,opt,name=Float64Value,proto3,oneof"`
 }
 
 type ColumnValue_BoolValue struct {
-	BoolValue bool `protobuf:"varint,7,opt,name=BoolValue,proto3,oneof"`
+	BoolValue bool `protobuf:"varint,6,opt,name=BoolValue,proto3,oneof"`
 }
 
 func (*ColumnValue_StringValue) isColumnValue_TypedValue() {}
 
-func (*ColumnValue_Uint32Value) isColumnValue_TypedValue() {}
-
 func (*ColumnValue_Uint64Value) isColumnValue_TypedValue() {}
 
 func (*ColumnValue_Float64Value) isColumnValue_TypedValue() {}
@@ -545,25 +531,22 @@ var file_v1_response_query_proto_rawDesc = []byte{
 	0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
 	0x0b, 0x32, 0x15, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6c,
 	0x75, 0x6d, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22,
-	0xf5, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
+	0xd1, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
 	0x12, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x4b,
 	0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
 	0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e,
 	0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b,
 	0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, 0x0b, 0x55,
-	0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d,
-	0x48, 0x00, 0x52, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
-	0x22, 0x0a, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05,
-	0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61,
-	0x6c, 0x75, 0x65, 0x12, 0x24, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x56, 0x61,
-	0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0c, 0x46, 0x6c, 0x6f,
-	0x61, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x09, 0x42, 0x6f, 0x6f,
-	0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09,
-	0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x54, 0x79, 0x70,
-	0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x21, 0x5a, 0x1f, 0x64, 0x70, 0x73, 0x2f, 0x61,
-	0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x62, 0x2f, 0x76,
-	0x31, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
-	0x6f, 0x33,
+	0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04,
+	0x48, 0x00, 0x52, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
+	0x24, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34,
+	0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c,
+	0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x42, 0x6f, 0x6f, 0x6c,
+	0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x64, 0x56, 0x61,
+	0x6c, 0x75, 0x65, 0x42, 0x21, 0x5a, 0x1f, 0x64, 0x70, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67,
+	0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65,
+	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -694,7 +677,6 @@ func file_v1_response_query_proto_init() {
 	}
 	file_v1_response_query_proto_msgTypes[6].OneofWrappers = []interface{}{
 		(*ColumnValue_StringValue)(nil),
-		(*ColumnValue_Uint32Value)(nil),
 		(*ColumnValue_Uint64Value)(nil),
 		(*ColumnValue_Float64Value)(nil),
 		(*ColumnValue_BoolValue)(nil),

+ 11 - 11
test/instance/instance_test.go

@@ -93,7 +93,7 @@ func TestTransaction(t *testing.T) {
 		assertEqual(id, resultMap["id"], "ID不一致").
 		assertEqual(name, resultMap["name"], "名称不一致").
 		assertEqual(now.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
-		assertEqual(tableNum, resultMap["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum), resultMap["table_num"], "表数量不一致").
 		transaction(func(tx client.Transaction) error {
 			statement, err := tx.UpdateTx(&client.UpdateRequest{
 				TablePrefixWithSchema: tablePrefix,
@@ -123,7 +123,7 @@ func TestTransaction(t *testing.T) {
 		assertEqual(id, resultMap["id"], "ID不一致").
 		assertEqual(newName, resultMap["name"], "名称不一致").
 		assertEqual(newNow.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
-		assertEqual(newTableNum, resultMap["table_num"], "表数量不一致").
+		assertEqual(uint64(newTableNum), resultMap["table_num"], "表数量不一致").
 		transaction(func(tx client.Transaction) error {
 			statement, err := tx.UpdateTx(&client.UpdateRequest{
 				TablePrefixWithSchema: tablePrefix,
@@ -234,7 +234,7 @@ func TestTransactionBatch(t *testing.T) {
 		assertEqual(id1, resultMap["id"], "ID不一致").
 		assertEqual(name1, resultMap["name"], "名称不一致").
 		assertEqual(now1.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
-		assertEqual(tableNum1, resultMap["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum1), resultMap["table_num"], "表数量不一致").
 		queryByKeys(&client.QueryByKeysRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
@@ -243,7 +243,7 @@ func TestTransactionBatch(t *testing.T) {
 		assertEqual(id2, resultMap["id"], "ID不一致").
 		assertEqual(name2, resultMap["name"], "名称不一致").
 		assertEqual(now2.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
-		assertEqual(tableNum2, resultMap["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum2), resultMap["table_num"], "表数量不一致").
 		transaction(func(tx client.Transaction) error {
 			statement, err := tx.DeleteBatchTx(&client.DeleteBatchRequest{
 				Items: []client.DeleteTableRowItem{
@@ -325,7 +325,7 @@ func TestInsert(t *testing.T) {
 		assertEqual(id, resultMap["id"], "ID不一致").
 		assertEqual(name, resultMap["name"], "名称不一致").
 		assertEqual(now.UnixMilli(), resultMap["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum, resultMap["table_num"], "表数量不一致")
+		assertEqual(uint64(tableNum), resultMap["table_num"], "表数量不一致")
 }
 
 func TestInsertBatch(t *testing.T) {
@@ -391,7 +391,7 @@ func TestInsertBatch(t *testing.T) {
 		assertEqual(id1, resultsMap[0]["id"], "ID不一致").
 		assertEqual(name1, resultsMap[0]["name"], "名称不一致").
 		assertEqual(now1.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum1, resultsMap[0]["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum1), resultsMap[0]["table_num"], "表数量不一致").
 		commonQuery(&client.CommonQueryRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
@@ -405,7 +405,7 @@ func TestInsertBatch(t *testing.T) {
 		assertEqual(id2, resultsMap[0]["id"], "ID不一致").
 		assertEqual(name2, resultsMap[0]["name"], "名称不一致").
 		assertEqual(now2.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum2, resultsMap[0]["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum2), resultsMap[0]["table_num"], "表数量不一致").
 		queryOnlyByWhereAndOrderBy(&client.QueryByWhereAndOrderByRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
@@ -418,7 +418,7 @@ func TestInsertBatch(t *testing.T) {
 		assertEqual(id1, resultsMap[0]["id"], "ID不一致").
 		assertEqual(name1, resultsMap[0]["name"], "名称不一致").
 		assertEqual(now1.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum1, resultsMap[0]["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum1), resultsMap[0]["table_num"], "表数量不一致").
 		commonQueryOnly(&client.CommonQueryRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
@@ -431,7 +431,7 @@ func TestInsertBatch(t *testing.T) {
 		assertEqual(id2, resultsMap[0]["id"], "ID不一致").
 		assertEqual(name2, resultsMap[0]["name"], "名称不一致").
 		assertEqual(now2.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum2, resultsMap[0]["table_num"], "表数量不一致")
+		assertEqual(uint64(tableNum2), resultsMap[0]["table_num"], "表数量不一致")
 }
 
 func TestUpdate(t *testing.T) {
@@ -490,7 +490,7 @@ func TestUpdate(t *testing.T) {
 		assertEqual(id, resultMap["id"], "ID不一致").
 		assertEqual(newName, resultMap["name"], "名称不一致").
 		assertEqual(newNow.UnixMilli(), resultMap["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(newTableNum, resultMap["table_num"], "表数量不一致")
+		assertEqual(uint64(newTableNum), resultMap["table_num"], "表数量不一致")
 }
 
 func TestDelete(t *testing.T) {
@@ -658,7 +658,7 @@ func TestReply(t *testing.T) {
 		assertEqual(id, resultMap["id"], "ID不一致").
 		assertEqual(name, resultMap["name"], "名称不一致").
 		assertEqual(now.UnixMilli(), resultMap["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum, resultMap["table_num"], "表数量不一致")
+		assertEqual(uint64(tableNum), resultMap["table_num"], "表数量不一致")
 }
 
 func TestEventQuery(t *testing.T) {

+ 11 - 11
test/v1/v1_test.go

@@ -97,7 +97,7 @@ func TestTransaction(t *testing.T) {
 		assertEqual(id, resultMap["id"], "ID不一致").
 		assertEqual(name, resultMap["name"], "名称不一致").
 		assertEqual(now.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
-		assertEqual(tableNum, resultMap["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum), resultMap["table_num"], "表数量不一致").
 		transaction(func(tx client.Transaction) error {
 			statement, err := tx.UpdateTx(&client.UpdateRequest{
 				TablePrefixWithSchema: tablePrefix,
@@ -127,7 +127,7 @@ func TestTransaction(t *testing.T) {
 		assertEqual(id, resultMap["id"], "ID不一致").
 		assertEqual(newName, resultMap["name"], "名称不一致").
 		assertEqual(newNow.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
-		assertEqual(newTableNum, resultMap["table_num"], "表数量不一致").
+		assertEqual(uint64(newTableNum), resultMap["table_num"], "表数量不一致").
 		transaction(func(tx client.Transaction) error {
 			statement, err := tx.UpdateTx(&client.UpdateRequest{
 				TablePrefixWithSchema: tablePrefix,
@@ -240,7 +240,7 @@ func TestTransactionBatch(t *testing.T) {
 		assertEqual(id1, resultMap["id"], "ID不一致").
 		assertEqual(name1, resultMap["name"], "名称不一致").
 		assertEqual(now1.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
-		assertEqual(tableNum1, resultMap["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum1), resultMap["table_num"], "表数量不一致").
 		queryByKeys(&client.QueryByKeysRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
@@ -249,7 +249,7 @@ func TestTransactionBatch(t *testing.T) {
 		assertEqual(id2, resultMap["id"], "ID不一致").
 		assertEqual(name2, resultMap["name"], "名称不一致").
 		assertEqual(now2.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
-		assertEqual(tableNum2, resultMap["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum2), resultMap["table_num"], "表数量不一致").
 		transaction(func(tx client.Transaction) error {
 			statement, err := tx.DeleteBatchTx(&client.DeleteBatchRequest{
 				Items: []client.DeleteTableRowItem{
@@ -333,7 +333,7 @@ func TestInsert(t *testing.T) {
 		assertEqual(id, resultMap["id"], "ID不一致").
 		assertEqual(name, resultMap["name"], "名称不一致").
 		assertEqual(now.UnixMilli(), resultMap["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum, resultMap["table_num"], "表数量不一致")
+		assertEqual(uint64(tableNum), resultMap["table_num"], "表数量不一致")
 }
 
 func TestInsertBatch(t *testing.T) {
@@ -401,7 +401,7 @@ func TestInsertBatch(t *testing.T) {
 		assertEqual(id1, resultsMap[0]["id"], "ID不一致").
 		assertEqual(name1, resultsMap[0]["name"], "名称不一致").
 		assertEqual(now1.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum1, resultsMap[0]["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum1), resultsMap[0]["table_num"], "表数量不一致").
 		commonQuery(&client.CommonQueryRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
@@ -415,7 +415,7 @@ func TestInsertBatch(t *testing.T) {
 		assertEqual(id2, resultsMap[0]["id"], "ID不一致").
 		assertEqual(name2, resultsMap[0]["name"], "名称不一致").
 		assertEqual(now2.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum2, resultsMap[0]["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum2), resultsMap[0]["table_num"], "表数量不一致").
 		queryOnlyByWhereAndOrderBy(&client.QueryByWhereAndOrderByRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
@@ -428,7 +428,7 @@ func TestInsertBatch(t *testing.T) {
 		assertEqual(id1, resultsMap[0]["id"], "ID不一致").
 		assertEqual(name1, resultsMap[0]["name"], "名称不一致").
 		assertEqual(now1.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum1, resultsMap[0]["table_num"], "表数量不一致").
+		assertEqual(uint64(tableNum1), resultsMap[0]["table_num"], "表数量不一致").
 		commonQueryOnly(&client.CommonQueryRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
@@ -441,7 +441,7 @@ func TestInsertBatch(t *testing.T) {
 		assertEqual(id2, resultsMap[0]["id"], "ID不一致").
 		assertEqual(name2, resultsMap[0]["name"], "名称不一致").
 		assertEqual(now2.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum2, resultsMap[0]["table_num"], "表数量不一致")
+		assertEqual(uint64(tableNum2), resultsMap[0]["table_num"], "表数量不一致")
 }
 
 func TestUpdate(t *testing.T) {
@@ -502,7 +502,7 @@ func TestUpdate(t *testing.T) {
 		assertEqual(id, resultMap["id"], "ID不一致").
 		assertEqual(newName, resultMap["name"], "名称不一致").
 		assertEqual(newNow.UnixMilli(), resultMap["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(newTableNum, resultMap["table_num"], "表数量不一致")
+		assertEqual(uint64(newTableNum), resultMap["table_num"], "表数量不一致")
 }
 
 func TestDelete(t *testing.T) {
@@ -676,7 +676,7 @@ func TestReply(t *testing.T) {
 		assertEqual(id, resultMap["id"], "ID不一致").
 		assertEqual(name, resultMap["name"], "名称不一致").
 		assertEqual(now.UnixMilli(), resultMap["time"].(time.Time).Local().UnixMilli(), "时间不一致").
-		assertEqual(tableNum, resultMap["table_num"], "表数量不一致")
+		assertEqual(uint64(tableNum), resultMap["table_num"], "表数量不一致")
 }
 
 func TestEventQuery(t *testing.T) {