title: Ruby: Exposing MySQL query ability to users via RESTful API
body: <p>There are similar <a href="http://www.quora.com/How-can-I-expose-a-MySQL-database-as-a-web-service" rel="nofollow">posts like this on the internet</a>, but they seem to be targeted towards lower level languages like Java. <a href="https://netbeans.org/" rel="nofollow">NetBeans</a> for example seems to have this kind of functionality. </p>
  
  <p>Here is what I want to do:</p>
  
  <p>I have a large dataset of items. I want to create a RESTful API that would enable my users to perform complex queries to retrieve data from the MySQL database on my backend. </p>
  
  <p>The API needs to be able to:</p>
  
  <ol>
  <li><code>SELECT</code> a table to retrieve values from</li>
  <li>Be able to use common MySQL aggregate functions such as <code>COUNT</code>, <code>SUM</code>,
  and <code>AVG</code> on the results</li>
  <li>Create <code>WHERE</code> conditions</li>
  </ol>
  
  <p>Security is not an issue as this my simply an MVP for now. On a future iteration I will take security into consideration. Are there any Ruby gems which provide a framework for constructing this kind of system?</p>
  
  <p>I am open to using either Sinatra or Rails for this system.</p>