Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 1.1 KB

File metadata and controls

24 lines (19 loc) · 1.1 KB

DevExtreme helpers remote datasource.

Build status Maven Central

Ported from DevExtreme.Helpers.DataSource written in C#.

WhereClauseBuilder builder = new WhereClauseBuilder();
String json = "[\"CustomerID\",\"=\",\"ALFKI\"]";
JsonArray jArray = (JsonArray) (new JsonParser().parse(json));
String sqlWhereClause = builder.buildFor(jArray);

Outputs:

CustomerID = "ALFKI"

In sql you can write

Exec('Select * from customers where ' + @sqlWhereClause);

There is an overloaded version of WhereClauseBuilder you can provide your own implentation SQLColumnProvider if you are using table aliases you can customize there.