The SQL C++ code generator (sql2class) utility is a code generation tool to convert SQL output to simple C++ classes. It supports MySQL and Sqlite. For each database table, one C++ class will be generated containing member variables for each column, as well as methods to read / insert / update records and also return the record as XML.
| Tags | Database Software Development Code Generators |
|---|---|
| Licenses | GPL |
| Operating Systems | POSIX Linux |
| Implementation | C C++ |
Recent releases


Release Notes: One crash bug due to unsafe pointer use has been fixed.


Release Notes: Fixes one parse problem in index parsing and one buffer overrun.


Release Notes: Classes are now generated with get/set methods for field data. To get the old behaviour, a '-getset' option has been added that disables generation of get/set methods. Name mangling of table and column names can be turned off with the new option '-mangle'.


Release Notes: MySQL set and enum support are working again. A header comment block was added to each file, containing the exact command line and sql2class version used to generate the file. A Win32 project file added for VS6.


Release Notes: An SQL parsing issue was fixed, having to do with unique indexes. A tutorial covering sql2class use together with mysqlwrapped/sqlitewrapped libraries has been added.