title: Syntax analysis of SQL query
body: <p>I'm creating a database wrapper in Java and I want it to analyze a sql query and determine the type of query. Is this possible or out there exists a library for this?</p>
  
  <p>I'm doing it like this:</p>
  
  <pre><code>DB db = new DB();
  db.execute(String query, String... params);
  </code></pre>
  
  <p>Then I execute the query using PreparedStatement.</p>
  
  <p>So there a queries where I don't need the params. I want to write a general method for all queries.</p>