@@ -380,6 +380,15 @@ func (rows VoltRows) GetStringValue(valtype int8, colIndex int16) (string, error
380
380
return "0" , nil
381
381
}
382
382
return fmt .Sprintf ("%d" , i .(int8 )), nil
383
+ case 4 :
384
+ i , err := rows .GetSmallInt (colIndex )
385
+ if err != nil {
386
+ return "" , err
387
+ }
388
+ if i == nil {
389
+ return "0" , nil
390
+ }
391
+ return fmt .Sprintf ("%d" , i .(int16 )), nil
383
392
case 5 :
384
393
i , err := rows .GetInteger (colIndex )
385
394
if err != nil {
@@ -407,7 +416,38 @@ func (rows VoltRows) GetStringValue(valtype int8, colIndex int16) (string, error
407
416
return "0" , nil
408
417
}
409
418
return fmt .Sprintf ("%f" , i .(float64 )), nil
419
+ case 11 :
420
+ t , err := rows .GetTimestamp (colIndex )
421
+ if err != nil {
422
+ return "" , err
423
+ }
424
+ if t == nil {
425
+ return "0" , nil
426
+ }
427
+ return t .(time.Time ).String (), nil
428
+ case 22 :
429
+ t , err := rows .GetDecimal (colIndex )
430
+ if err != nil {
431
+ return "" , err
432
+ }
433
+ if t == nil {
434
+ return "0" , nil
435
+ }
436
+ return fmt .Sprintf ("%v" , t .(big.Float )), nil
437
+ case 25 :
438
+ t , err := rows .GetVarbinary (colIndex )
439
+ if err != nil {
440
+ return "" , err
441
+ }
442
+ if t == nil {
443
+ return "" , nil
444
+ }
445
+ return string (t .([]byte )), nil
446
+ }
447
+ if valtype != 9 {
448
+ return "" , errors .New ("Unsupported type for GetStringValue" )
410
449
}
450
+ // type 9 is string
411
451
s , err := rows .GetString (colIndex )
412
452
if err != nil || s == nil {
413
453
return "" , err
0 commit comments