The dbixx library is a C++ wrapper for [LibDBI](http://libdbi.sourceforge.net/) C library. It is strongly recommended to read [LibDBI documentation](http://libdbi.sourceforge.net/docs.html) as well.
|
|
For quick start you may want to read [Introduction to DbiXX](/wikipp/en/page/tut_into_dbixx)
|
|
## 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](/wikipp/en/page/ref_dbixx_session) -- the major session object. It holds connection to the library.
|
- [dbixx::row](/wikipp/en/page/ref_dbixx_row) -- stores single row of output.
|
- [dbixx::result](/wikipp/en/page/ref_dbixx_result) -- stores the output row set of queries.
|
- [dbixx::dbixx\_error](/wikipp/en/page/ref_dbixx_error) is thrown in case of different errors.
|
- [dbixx::transaction](/wikipp/en/page/ref_dbixx_trans) is the class that allows execution of exception safe transactions.
|
|
### Auxiliary classes
|
|
- `dbixx::exec` and `dbixx::null` used 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 are another libraries like [SOCI](http://soci.sourceforge.net/) that provide similar functionality. For the record, dbixx had took many ideas from SOCI.
|
|
If you plan to use any library different from DbiXX I recommend you to take in account following points:
|
|
1. Does it provide auto-escaping? This is most important feature. It should be straightforward operation. Otherwise, you may be victim of SQL Injections.
|
2. Is it exception safe and provides exception safe transactions?
|
3. 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.
|
|
|