Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
steiler committed Sep 6, 2024
1 parent c85f80f commit 89f1dee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/datastore/datastore_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -920,22 +920,22 @@ func convertStringToTv(schemaType *sdcpb.SchemaLeafType, v string, ts uint64) (*
Value: &sdcpb.TypedValue_StringVal{StringVal: v},
}, nil
case "uint64", "uint32", "uint16", "uint8":
i, err := strconv.Atoi(v)
i, err := strconv.ParseUint(v, 10, 64)
if err != nil {
return nil, err
}
return &sdcpb.TypedValue{
Timestamp: ts,
Value: &sdcpb.TypedValue_UintVal{UintVal: uint64(i)},
Value: &sdcpb.TypedValue_UintVal{UintVal: i},
}, nil
case "int64", "int32", "int16", "int8":
i, err := strconv.Atoi(v)
i, err := strconv.ParseInt(v, 10, 64)
if err != nil {
return nil, err
}
return &sdcpb.TypedValue{
Timestamp: ts,
Value: &sdcpb.TypedValue_IntVal{IntVal: int64(i)},
Value: &sdcpb.TypedValue_IntVal{IntVal: i},
}, nil
case "boolean":
b, err := strconv.ParseBool(v)
Expand Down

0 comments on commit 89f1dee

Please sign in to comment.