Closed Syllll closed 5 years ago
OK, nice for the checks. However, I am not sure the static in the namespace if entirely a good idea (see last commit). The idea is for a user to put content in the namespace at startup :
_CWF::SqlDatabaseStorage CWF::DbStorage::_storage("QSQLITE", // type of the database "localhost", // host of the database dbAppPath, // Name or path to the database "toto", // username "rere", // password 3306 // port 5432 ); QString CWF::DbStorage::secret = "sedqddqzdif";
I will let you think about this ;-).
Thank you my friend, I'm going to rewiew.
Pull Request Checklist
Please check if your Pull Request fulfills the following requirements:
Pull Request Type
What kind of change does this Pull Request introduce?
What is the current behavior?
CWF is awesome but lacks ORM and entity management features.
What is the new behavior?
New classes implements a basic ORM that could be extended in the future work. Currently, the little orm works only with sqlite. It should be easy to make it works with SQL and PostGres as only a few string should be changed in the sqlquerymanager class.
The ORM functionalities are inspired from my experience with Symfony (php framework, see doctrine) and NodeJS (Sequelize orm).
Does this Pull Request introduce a breaking change?
Other information
The features added by this pull should really be extended and made more robust (full sql compatibility). Note the model classes reimplements some features of the metaclassparser but in a slightly different way: model is able to detect the properties of a given Qt object and of its base class(es). Thus, the list of properties returned internally is complete even if inheritance is used between models.
Overall, feel free to edit or comment. I will take all remarks with a positive mindset and I am happy to contribute to the project.