I am looking for an open source library in Java for parsing and building SQL-like expressions.
for example to evaluate validity of expressions like:
"(a = x or y ) and (b != z)"
in addition I want to have an API for building or extending expressions. something like:
Expression exp = new Expression();
exp.addCondition("a",{"x","y"},Operator.OR);
It's not very complicated to implement such a library, but aren't we develop in Java to enjoy collaborative development?
I'm pretty sure you can have ANTLR do this for you.
The grammatic looks very simple ( from here ) :P
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.