1717 Byte QuestDBType = "byte"
1818 // 16-bit signed integer (-32768 to 32767)
1919 Short QuestDBType = "short"
20- // 16-bit unicode charachter
20+ // 16-bit unicode character
2121 Char QuestDBType = "char"
2222 // 32-bit signed integer (0x80000000 to 0x7fffffff)
2323 Int QuestDBType = "int"
4141 Double QuestDBType = "double"
4242 // byte array
4343 Binary QuestDBType = "binary"
44+ // hyphenated uuid string
45+ UUID QuestDBType = "uuid"
4446 // 256-bit unsigned integer
4547 // unsupported
4648 Long256 QuestDBType = "long256"
@@ -132,6 +134,13 @@ func serializeValue(v interface{}, qdbType QuestDBType) (string, error) {
132134 return "" , fmt .Errorf ("could not json marshal %T: %w" , v , err )
133135 }
134136 return fmt .Sprintf ("\" %s\" " , base64 .StdEncoding .EncodeToString (by )), nil
137+ case UUID :
138+ // sent in as a hyphenated uuid string
139+ switch val := v .(type ) {
140+ case string :
141+ return fmt .Sprintf ("\" %s\" " , val ), nil
142+ }
143+
135144 default :
136145 return "" , fmt .Errorf ("type %T is not compatible with %s" , v , qdbType )
137146 }
@@ -153,6 +162,7 @@ var supportedQDBTypes = []QuestDBType{
153162 Double ,
154163 Binary ,
155164 JSON ,
165+ UUID ,
156166 // Long256,
157167}
158168
0 commit comments