Compare commits
1 Commits
query_pars
...
entgo/v1.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 90a722b99f |
@@ -57,10 +57,14 @@ func ExtractJsonFieldKeyValues(msg proto.Message, paths []string, needToSnakeCas
|
|||||||
|
|
||||||
v := rft.Get(fd)
|
v := rft.Get(fd)
|
||||||
switch v.Interface().(type) {
|
switch v.Interface().(type) {
|
||||||
case int32, int64, uint32, uint64, float32, float64, bool:
|
case bool:
|
||||||
|
keyValues = append(keyValues, fmt.Sprintf("%t", v.Interface()))
|
||||||
|
case int32, int64, uint32, uint64, float32, float64:
|
||||||
keyValues = append(keyValues, fmt.Sprintf("%d", v.Interface()))
|
keyValues = append(keyValues, fmt.Sprintf("%d", v.Interface()))
|
||||||
case string:
|
case string:
|
||||||
keyValues = append(keyValues, fmt.Sprintf("'%s'", v.Interface()))
|
keyValues = append(keyValues, fmt.Sprintf("'%s'", v.Interface()))
|
||||||
|
default:
|
||||||
|
keyValues = append(keyValues, fmt.Sprintf("%v", v.Interface()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user