我有一个字符串
((effectiveDate >= "11/01/2015") and (effectiveDate < "04/30/2016")) and (not ((name like "*John*")) and (name like "*Smith*") and (age > "20"))
将其转换为表达式后,它不保持括号顺序
Expression exp = Expression.fromString(origExpStr);
System.out.println(exp);
这导致
(effectiveDate >= "11/01/2015") and (effectiveDate < "04/30/2016") and not ((name like "*John*")) and (name like "*Smith*") and (age > "20")
从逻辑上讲,它可能意味着相同,但我想保持括号顺序以保持正确的分组。
转换为表达式后有没有办法保持括号顺序