DbiXX Sql Library
The dbixx library is a C++ wrapper for LibDBI C library. It gives a C++ friendly, exception safe interface for this library.
It is written by Artyom Beilis (Tonkikh) and licensed under LGPL v2.1.
- dbixx::session -- the major session object. It holds the connection to the library.
- dbixx::row -- stores a single row of output.
- dbixx::result -- stores the output row set of queries.
- dbixx::dbixx_error is thrown in case of different errors.
- dbixx::transaction is the class that allows execution of exception safe transactions.
Other Classes and Functions
dbixx::nullused for "syntactic sugar" operations.
dbixx::use()is an auxiliary function to insert NULL values easily.
DbiXX was build as a useful wrapper for libdbi. However it is not the only library that provides similar functionality.
It is not directly connected to CppCMS, but it was build to be useful for web development.
There are other libraries like SOCI that provide similar functionality. For the record, dbixx has taken many ideas from SOCI.
If you plan to use a library different from DbiXX, I recommend that you take the following into account:
- Does it provide auto-escaping? This is the most important feature. It should be a straightforward operation. Otherwise, you may be victim of SQL Injections.
- Is it exception safe and does it provides exception safe transactions?
- Does it support more than one database engine? Is this support good enough?
These are very important points that should be taken in consideration. The first two are mandatory for web development with CppCMS, the third one would prevent from you vendor lock-in.