|
|
@ -97,7 +97,7 @@ func (v *Value) Repr() string { |
|
|
|
case typeBool, typeInt, typeFloat: |
|
|
|
case typeBool, typeInt, typeFloat: |
|
|
|
return fmt.Sprintf("%v:%s", v.value, v.GetTypeString()) |
|
|
|
return fmt.Sprintf("%v:%s", v.value, v.GetTypeString()) |
|
|
|
case typeTimestamp: |
|
|
|
case typeTimestamp: |
|
|
|
return fmt.Sprintf("%s:TIMESTAMP", v.value.(*time.Time)) |
|
|
|
return fmt.Sprintf("%s:TIMESTAMP", v.value.(time.Time)) |
|
|
|
case typeString: |
|
|
|
case typeString: |
|
|
|
return fmt.Sprintf("\"%s\":%s", v.value.(string), v.GetTypeString()) |
|
|
|
return fmt.Sprintf("\"%s\":%s", v.value.(string), v.GetTypeString()) |
|
|
|
case typeBytes: |
|
|
|
case typeBytes: |
|
|
@ -335,7 +335,7 @@ func (v *Value) compareOp(op string, a *Value) (res bool, err error) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
boolV, ok1b := v.ToBool() |
|
|
|
boolV, ok1b := v.ToBool() |
|
|
|
boolA, ok2b := v.ToBool() |
|
|
|
boolA, ok2b := a.ToBool() |
|
|
|
if ok1b && ok2b { |
|
|
|
if ok1b && ok2b { |
|
|
|
return boolCompare(op, boolV, boolA) |
|
|
|
return boolCompare(op, boolV, boolA) |
|
|
|
} |
|
|
|
} |
|
|
|