dbic++ is a database client library written in C++ which comes with support for the following databases,
Clone the repository from github and have fun!
Read the instructions on github.
At the very least you need to know how AbstractHandle, AbstractStatement, Handle, and Statement work. It is also recommended that you read through documentation on Param.
Checkout Handle or StringIO for some quick examples. dbic++ source distribution also contains some examples that can be found under src/examples/.
To compile code that uses dbic++, use pkg-config to get the correct compiler flags.
g++ `pkg-config --libs --cflags dbic++` -o myprogram myprogram.cc
You can run these yourself if you’re keen. The makefile might need some tweaks on non-debian based distributions. The following results were obtained on a Core2DUO 2.53GHz, 4GB, 5200rpm drive with stock database configs.
cd bench/ && make ./benchmarks.sh + Setting up sample data (50 rows) * mysql * postgresql + Done ./benchmarks.sh -w bench -n10000 + Benchmarking mysql * mysql user 0.69 sys 0.21 real 2.34 * mysql++ user 1.06 sys 0.09 real 2.74 * dbic++ user 0.81 sys 0.25 real 2.58 + Benchmarking postgresql * pq user 0.42 sys 0.14 real 2.01 * dbic++ user 0.49 sys 0.12 real 2.05 + Finished
Pure virtual class that defines the api that individual database drivers need to support.
class AbstractHandle
Pure virtual class that defines the api that individual database drivers need to support.
class AbstractStatement
Facade for AbstractHandle.
class Handle
Facade for AbstractStatement, you should be using this for most of the normal work.
class Statement
Encapsulates a value in string or binary format.
struct Param
Concrete implementation of IO that can handle string data.
class StringIO : public IO