MySQL++ User Manual

Kevin Atkinson

Sinisa Milivojevic

Monty Widenius

Warren Young

$Date: 2007-06-28 00:17:10 -0600 (Thu, 28 Jun 2007) $


Table of Contents

1. Introduction
1.1. A Brief History of MySQL++
1.2. If You Have Questions...
2. Overview
2.1. The Connection Object
2.2. The Query Object
2.3. Result Sets
2.4. Exceptions
3. Tutorial
3.1. Running the Examples
3.2. A Simple Example
3.3. A More Complicated Example
3.4. Exceptions
3.5. Quoting and Escaping
3.6. Specialized SQL Structures
3.7. C++ Equivalents of SQL Column Types
3.8. Handling SQL Nulls
3.9. Creating Transaction Sets
3.10. Which Query Type to Use?
3.11. Conditional Result Row Handling
3.12. Executing Code for Each Row In a Result Set
3.13. Getting Field Meta-Information
3.14. Dealing with Binary Data
4. Template Queries
4.1. Setting up Template Queries
4.2. Setting the Parameters at Execution Time
4.3. Parameter Types and Function Overloads
4.4. Default Parameters
4.5. Error Handling
5. Specialized SQL Structures
5.1. sql_create
5.2. SSQLS Comparison and Initialization
5.3. Retrieving a Table Subset
5.4. Additional Features of Specialized SQL Structures
5.5. Harnessing SSQLS Internals
5.6. Alternate Creation Methods
5.7. Expanding SSQLS Macros
5.8. Extending the SSQLS Mechanism
5.9. SSQLS and BLOB Columns
6. Using Unicode with MySQL++
6.1. A Short History of Unicode
6.2. Unicode on Unixy Systems
6.3. Unicode on Windows
6.4. For More Information
7. Important Underlying C API Limitations
8. Incompatible Library Changes
8.1. API Changes
8.2. ABI Changes
9. Licensing
9.1. GNU Lesser General Public License
9.2. MySQL++ User Manual License

1. Introduction

MySQL++ is a powerful C++ wrapper for MySQL's C API. Its purpose is to make working with queries as easy as working with STL containers.

The latest version of MySQL++ can be found at the official web site.

Support for MySQL++ can be had on the mailing list. That page hosts the mailing list archives, and tells you how you can subscribe.

1.1. A Brief History of MySQL++

MySQL++ was created in 1998 by Kevin Atkinson. It started out MySQL-specific, but there were early efforts to try and make it database-independent, and call it SQL++. This is where the old library name "sqlplus" came from. This is also why the old versions prefixed some class names with "Mysql" but not others: the others were supposed to be the database-independent parts.

Then in 1999, Sinisa Milivojevic unofficially took over maintenance of the library, releasing versions 1.0 and 1.1. (All of Kevin's releases were pre-1.0 point releases.) Kevin gave over maintenance to Sinisa officially with 1.2, and ceased to have any involvement with the library's maintenance. Sinisa went on to maintain the library through 1.7.9, released in mid-2001. Since Sinisa is an employee of MySQL AB, it seems to be during this time that the dream of multiple-database compatibility died.

With version 1.7.9, MySQL++ went into a period of stasis, lasting over three years. During this time, Sinisa ran the MySQL++ mailing list and supported its users, but made no new releases. There were many patches submitted during this period, some of which were ignored, others which were just put on the MySQL++ web site for people to try. A lot of these patches were mutually-incompatible, and not all of them gave a fully-functional copy of MySQL++.

In early August of 2004, the current maintainer (Warren Young) got fed up with this situation and took over. He released 1.7.10 later that month.

1.2. If You Have Questions...

If you want to email someone to ask questions about this library, we greatly prefer that you send mail to the MySQL++ mailing list. The mailing list is archived, so if you have questions, do a search to see if the question has been asked before.

You may find people's individual email addresses in various files within the MySQL++ distribution. Please do not send mail to them unless you are sending something that is inherently personal. Not all of the principal developers of MySQL++ are still active in its development; those who have dropped out have no wish to be bugged about MySQL++. Those of us still active in MySQL++ development monitor the mailing list, so you aren't getting any extra "coverage" by sending messages to additional email addresses.