Closed yahya077 closed 7 months ago
No, detecting the results of sub-queries is not possible. You would need to execute them independently.
While you could use custom functions like this:
var result bool
func isGreaterThan(args ...interface{}) (interface{}, error) {
arg1 := args[0].(int)
arg2 := args[1].(int)
result = arg1 > arg2
return result, nil
}
Query:
isGreaterThan(lorem, 0) && isLessThen(ipsum, 2)
...(which stores the intermediate result in a global variable or closure-variable), it is very ugly and unreliable.
Hi, I'm using eval to validate expressions like "lorem > 0 && ipsum < 2". However, when one of the conditions is wrong, it only returns false. I need to know which one is set to false. Is there any help?