Open
Description
I want to get a statement like this:
SELECT * FROM flow WHERE ((ipValue <= 100 AND ipValue >= 200) OR (ipValue <= 300 AND ipValue >= 400)) AND value < 200
But I found that the api can only be written like this:
WhereQueryImpl<SelectQueryImpl> query = select()
.from("flow", getFullyMeasurement(param.getRp(), param.getTableName()))
.where();
query.andNested().and(lte("ipValue", 100))
.and(gte("ipValue", 200)).close();
query.orNested().and(lte("ipValue", 300))
.and(gte("ipValue", 400)).close();
query.and(lt("value", 200));
result
SELECT * FROM flow WHERE (ipValue <= 100 AND ipValue >= 200) OR (ipValue <= 300 AND ipValue >= 400) AND value < 200
How can I generate this form of sql:
((ipValue <= 100 AND ipValue >= 200) OR (ipValue <= 300 AND ipValue >= 400))