DbiXX Sql Library
The dbixx library is a C++ wrapper for LibDBI C library. It is strongly recommended to read LibDBI documentation as well.
General
The major include file of DbiXX library is:
#include <dbixx/dbixx.h>
All classed are placed inside dbixx namespace. In order to link with this library you need to add -ldbixx compiler flag.
Classes
Main Classes
- dbixx::session – the major session object. It holds connection to the library.
- dbixx::row – stores 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.
Auxiliary classes
dbixx::execanddbixx::nullused for "syntactic sugar" operations.
Other libraries
DbiXX was build as useful wrapper for libdbi, however it is not the only library that may provide similar functionality.
It is not connected directly for CppCMS functionality, but it was build to be useful for web development.
There another libraries like SOCI that, dbixx had took many ideas from it.
If you plan to use any library different from DbiXX I recommend you to take in account following points:
- Does it provide auto-escaping? This is most important feature. It should be straightforward operation. Otherwise, you may be victim of SQL Injections.
- Is it exception safe and provides exception safe transactions?
- Does it support more then single database? Is this support good enough?
In my opinion, there 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.