Using a DB with C++ is a real mess and it was refreshing when I moved to Java to be able to use a unified system to abstract the whole layer away (aka Hibernate).
There are a couple of C++ abstract layers for DB's out there but they are usually vendor specific and only a thin layer that wraps the real C API. Has anybody come across something more like hibernate for C++ or know of a group or open source project that is looking at this problem domain.
There is now a completely in C++ written Hibernate layer. You can find it at github at edwig/CXHibernate. It comes with full written documentation.
I feel your pain. You'll quickly be using separate libraries for database access, XML processing, threading, and everything else applications commonly need. For this reason I often use Qt, which provides most common functionality often need in programs (database access, XML processing, threading, GUI widgets, etc.). Their SQL classes are pretty decent and work with many databases. But it does not abstract SQL away like many object-relation mappers.
We developed an open source library named QHibernate.
QHibernate is a Hibernate ORM(Object Relation Mapping) port for C++ and Qt Framework. Current version is a proof of concept work. It is used with PostgreSQL 9.4 and Qt 5.4.1.
Features
You can find some details, source and download links here: QHibernate
I don't know of any C++ library like Hibernate, but certainly there are non-vendor specific libs: SOCI and DTL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With