Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
czpmango committed Jan 4, 2022
1 parent 1d2d509 commit d5d261c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,18 +362,18 @@ func value2Nvalue(any interface{}) (value *nebula.Value, err error) {
err = er
}
value.MVal = nv
} else if v, ok := any.(Value); ok {
} else if v, ok := any.(nebula.Value); ok {
return v
} else if v, ok := any.(Date); ok {
value.SVal = Date(v)
} else if v, ok := any.(DateTime); ok {
value.SVal = DateTime(v)
} else if v, ok := any.(Duration); ok {
value.SVal = Duration(v)
} else if v, ok := any.(Time); ok {
value.SVal = Time(v)
} else if v, ok := any.(string); ok {
value.GgVal = Geography(v)
} else if v, ok := any.(nebula.Date); ok {
value.SVal = nebula.Date(v)
} else if v, ok := any.(nebula.DateTime); ok {
value.SVal = nebula.DateTime(v)
} else if v, ok := any.(nebula.Duration); ok {
value.SVal = nebula.Duration(v)
} else if v, ok := any.(nebula.Time); ok {
value.SVal = nebula.Time(v)
} else if v, ok := any.(nebula.Geography); ok {
value.GgVal = nebula.Geography(v)
} else {
// unsupport other Value type, use this function carefully
err = fmt.Errorf("Only support convert boolean/float/int/string/map/list to nebula.Value but %T", any)
Expand Down

0 comments on commit d5d261c

Please sign in to comment.