title: Which execute function should i use in MySQL connector/c++?
body: <p>I need to write a <strong>wrapper</strong> (based on <strong>MySQL Connector/C++</strong>) which encapsulate specific SQL statements and provide user friendly interfaces, like: <strong>insert()</strong>, <strong>update()</strong>, <strong>delete()</strong>, <strong>select()</strong>, etc. </p>
  
  <p>In MySQL's native C API, every SQL statement could be executed by simply call <strong>"mysql_real_query()"</strong>, but now, in <strong>MySQL Connector/C++</strong>, things get a little confused. There's <strong>3</strong> execute functions in <strong>sql::Statment</strong> class and <strong>6</strong> execute functions in <strong>sql::PreparedStatement</strong> class:</p>
  
  <p>mysql-connector-c++-1.1.5\driver\mysql_statement.h: </p>
  
  <pre><code>bool execute(const sql::SQLString&amp; sql);
  sql::ResultSet* executeQuery(const sql::SQLString&amp; sql);
  int executeUpdate(const sql::SQLString&amp; sql);
  </code></pre>
  
  <p>mysql-connector-c++-1.1.5\driver\mysql_prepared_statement.h, 104:</p>
  
  <pre><code>bool execute();
  bool execute(const sql::SQLString&amp; sql);
  
  sql::ResultSet executeQuery();
  sql::ResultSet executeQuery(const sql::SQLString&amp; sql);
  
  int executeUpdate();
  int executeUpdate(const sql::SQLString&amp; sql);
  </code></pre>
  
  <p>I wondered <strong>why there're so many execution functions rather than a simple and unified one?</strong>
  And <strong>which execute function should i use for specify SQL statements?</strong></p>
  
  <p><strong>Note:</strong> I'm using <strong>MySQL Connector/C++ 1.1.5</strong> with <strong>MySQL Server 5.6</strong> as backend.</p>