A plugin for query based search (Query Builder) in jQuery like Jira's Advanced Search?
<p>I'm on the hunt for a jQuery library to fulfill a certain UI request. I'm trying to achieve an advanced search feature that is <strong>purely query based</strong>. Such as, the user types out the following in a text box:</p>

<p><em>Project is "Unicorn" and (Employee starts with "Bob" or Employee is "Jane")</em></p>

<p>I don't care about what gets sent to the back-end when submitting, as long as it's somewhat structured JSON so I can build an SQL query based off it. I don't care about it presenting any results, as I have that under control. I just really need to find something to nail the UI for the query building. The real trick comes from having auto-completes for the Columns, Conditions, and Joining. </p>

<p>The UI should know what the user is typing at all times: a column, condition, value, or joiner and provide appropriate auto-completes:</p>

<ol>
<li>When the user clicks in the text box for the first time, an auto complete offers a list of columns.</li>
<li>Once a column is chosen, an auto-complete offers a list of conditions =, !=, &lt;, >, contains, etc.</li>
<li>Then shut up while the user types a value. An added bonus would be to provide an auto-complete for boolean or enum based columns.</li>
<li>Then offer an auto-complete for a joiner such as And or Or</li>
<li>Then start over again with an auto-complete for the columns</li>
</ol>

<p>It would be grand if there was some validation involved and I don't mind feeding a custom JSON object defining the columns, conditions, etc.</p>

<p>I've been scouring the web for such a library and haven't found much in the way of these requirements. Has anyone had any success with this type of Query Builder and knows where I can find something to do this trick?</p>
