congratulations on this achievement!
One question: why do we need to explicitly delete statements, connections,
and result sets? Couldn't the clean up be dealt with in the destructor, so
that the objects would free themselves when going out of scope?
It seems a lot of unnecessary writing for a C++ API.
Ulf Wendel wrote:
> Dear MySQL Users,
> A new connector has been made available: MySQL Connector/C++. The MySQL
> Connector/C++ provides a C++ API for connecting client applications to
> the MySQL Server. You can download a preview at:
> The MySQL Connector/C++ mimics the JDBC 3.0 API. JDBC is a commonly
> known and well designed API. The Connector/C++ preview implements about
> 75% of the methods of the following classes of the JDBC 3.0 API:
> * Connection
> * DatabaseMetaData
> * Driver
> * PreparedStatement
> * ResultSet
> * ResultSetMetaData
> * Savepoint
> * Statement
> Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client
> Library) offers the following advantages for C++ users:
> * Convenience of pure C++ - no C function calls
> * Support of a well designed API - JDBC 3.0
> * Support of a commonly known and well documented API - JDBC 3.0
> * Support of the object oriented programming paradigm
> * Shorter development times
> You can find further details, including usage examples, on the project's
> MySQL Forge wiki page at:
> Please note that the MySQL Connector/C++ is released as a Software
> Preview. We do not recommend using it in production environments or
> systems with critical data.
> Feedback, bug reports, bug fixes, patches and so on are welcome and
> You may also want to contribute to the MySQL Forum on C/C++ at
> http://forums.mysql.com/list.php?45 or join the MySQL Connector/C++
> mailing list http://lists.mysql.com/connector-cplusplus .
> Connector/C++ is licensed under the terms of the GPL, like most MySQL
> Connectors. There are special exceptions to the terms and conditions of
> the GPL as it is applied to this software, see FLOSS License Exception
> (http://www.mysql.com/about/legal/licensing/foss-exception.html). If you
> need a non-GPL license for commercial distribution, please contact
> mailto:sales@stripped .
> Ulf Wendel
Giuseppe Maxia, MySQL Community Team Lead
Sun Microsystems, www.mysql.com