I am fairly new to this library, and ORM in general. I know tools like EntityFramework can generate code from a database. Can ODB for C++ do this work?
Database. Operational Database (ODB)
ODB/SQL is a language to manage ODB observational databases. It is a minimum subset of international standard SQL (Structured Query Language) used to manipulate genuine relational databases.
ODB is an open-source, cross-platform, and cross-database object-relational mapping (ORM) system for C++. It allows you to persist C++ objects to a relational database without having to deal with tables, columns, or SQL and without manually writing any mapping code.
I don't think so. Looking at the main page of the project, there is an example how to use ODB. It seem that you need only add some pragmas
here and there:
#pragma db object
class person
{
...
private:
friend class odb::access;
person () {}
#pragma db id
string email_;
string name_;
unsigned short age_;
};
but you do that on already present code, so no, it does not generate anything.
the QxORM maybe help you to this work. this library use for Qt framework.
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