2
0

Support time durations for simple protocol

Signed-off-by: Michael Darr <michael.e.darr@gmail.com>
This commit is contained in:
Michael Darr
2021-07-13 00:24:58 -04:00
committed by Jack Christensen
parent 1470d69c58
commit 59fa1868a7
2 changed files with 15 additions and 0 deletions
+2
View File
@@ -78,6 +78,8 @@ func convertSimpleArgument(ci *pgtype.ConnInfo, arg interface{}) (interface{}, e
return arg, nil
case bool:
return arg, nil
case time.Duration:
return fmt.Sprintf("%d microsecond", int64(arg)/1000), nil
case time.Time:
return arg, nil
case string: