Add TimeExpression and TimeColumn types.

This commit is contained in:
zer0sub 2019-04-03 14:18:58 +02:00
parent b2f84d048c
commit 273bf1ed4c
6 changed files with 129 additions and 23 deletions

View file

@ -411,10 +411,11 @@ func mapRowToStruct(scanContext *scanContext, groupKey string, typesProcessed ma
for i := 0; i < structType.NumField(); i++ {
field := structType.Field(i)
//fieldTypeName := field.Name
fieldValue := structValue.Field(i)
//fmt.Println("---------------", fieldTypeName)
////spew.Dump(field.Type)
//fieldTypeName := field.Name
//fmt.Println("---------------", fieldTypeName,)
//spew.Dump(field.Type)
fieldName := field.Name
@ -486,8 +487,8 @@ func isDbBaseType(objType reflect.Type) bool {
typeStr := objType.String()
switch typeStr {
case "string", "int32", "int16", "float32", "float64", "time.Time", "bool",
"*string", "*int32", "*int16", "*float32", "*float64", "*time.Time", "*bool":
case "string", "int32", "int16", "float32", "float64", "time.Time", "bool", "[]byte", "[]uint8",
"*string", "*int32", "*int16", "*float32", "*float64", "*time.Time", "*bool", "*[]byte", "*[]uint8":
return true
}