Simple SQL Query Builder in JQuery

2019-03-10 04:32发布

问题:

I am trying to find a simple query builder interface similar to the SQL Query Builder plugin at http://plugins.jquery.com/project/SQL_QUERY_BUILDER, but simpler.

I like it's functionality, but I just want to define the fields, the types, and perhaps some extra information (min and max value) and have a list generated that match the criteria. Simple ANDs and ORs as well.

Example GUI would be something like:

[SELECT BOX (and/or)] | [SELECT BOX (FIELD NAME)] | [SELECT BOX (Comparison)] | VALUE | [BUTTON ADD]

   department = 'SALES'

AND name like '%SMITH%'

Does a plugin like this exist in JQuery or another Javascript Framework?

Thanks!

Matt

回答1:

I've been searching for a while myself now, since I need the same thing. I found this expbuilder project that seems to be very close to what we need. It's not actively developed and it doesn't look polished. You can play around with the UI here.



回答2:

u can use jquery query builder , https://github.com/mistic100/jQuery-QueryBuilder/