Debea Database Access Library is a collection of interfaces that allows you to map C++ objects to relations in various SQL and file databases.
By removing hand-written SQL queries (or csv file parsing) for serialization of C++ objects you can speed-up development of applications that needs to store and load their data in SQL or other database formats. Another positive side effect of using this library is that you will always have database schema strictly related to C++ logical model.
Here are some key features of "Debea Database Access Library":
Full serialization of C++ objects using different databases (SQL, CSV files)
· Debea can map, load and store objects as database relations. That's main purpose of this library. You can also use it to send simple SQL queries to variety of databases that can be accessed through ODBC or iODBC.
Automatic INSERT or UPDATE SQL statement generation based on object state.
· Storable objects have information about its database state. When new object is created, it is marked as Storeable::NEW and first serialization will generate SQL INSERT statement for that object. Subsequent updates will automatically generate SQL UPDATE statements.
Support for all reference types (1-n, m-n, 1-1)
· Debea supports storing composited storeable objects. If you have object that contains list of objects and all of them have STORE_TABLE defined you can store and load them all in single program call.
· Debea knows how to traverse on std::list, std::set and other standard containers, but of course you can define CollectionFilter for your own containers too.
Ability to create conversions for user defined types
· Every object member and binded variable can be stored in multiple ways. Conversion between member/variable and database record field can be fully controlled by user code.
Support for multiple inheritance from dba::Storeable
· You can add dba::Storeable as parent to existing object, define STORE_TABLE for it and store it in database with no additional effort.
Support for storing C++ object in SQL tables with different names
· You can open stream for mapped objects using custom relation name. This way you can map one object to multiple relations as long as they have identical schema.
Flexible database transaction handling
· You can enclose multiple database operations in one Transaction context simply by creating dba::Transaction object and getting streams from it. As long as this object exists all operations will be done in single transaction.
· Transaction object can be nested. This means that if you surround two instances of dba::Transaction with another transaction object you will merge those two transactions in one.
Support for binding custom variables to read and write object streams
· You can bind custom variables to object stream. This way you can reconstruct object references using values fetched from foreign keys.
Loading C++ objects from SQL queries
· You can define your own SQL query and fill list of mapped objects using that query.
· Library is using plug-in architecture for various SQL RDBMS support and provides one, simple interface for query processing and object serialization.
Debea Database Access Library is using plug-in architecture for various SQL RDBMS support and provides one, simple interface for query processing and object serialization.
What's New in This Release: [ read full changelog ]
· fixes NULL handling when using dba::SQL.