- added create() factory method to create DatabaseConnection from
config QVariantHash
- configurable charset, collation, timezone, QSqlDatabase options,
strict mode, sql modes
- for now all this code is in the DatabseConnection ctor :/
- added selectOne() and table() to the DatabaseConnection
- solved db connection in tests, connection code moved to database
Utils shared library
- for now only one db is supported in tests and actually in main
library too and it is MySQL server
- modified EntityManager to use this new connection code, has two
ctors, one takes DatabaseConnection reference and other QVariantHash
config hash
- added create() factory method to create EntityManager from config
QVariantHash
- TinyOrm is shared library now in src/ folder
- added tests/ folder as subdirs project
- some init tests for QueryBuilder and DatabaseConnection
- renamed MANGO_DEBUG_SQL to TINYORM_DEBUG_SQL
this commit contains few bigger changes:
- added push method
- unified relationVisitor() for models
- added relation store for nicer api for end users
- getRelation()/getRelationValue() return pointers to models, which
points directly to relationships data member, so user can directly
modify this models and push/save afterward
- relation ctors take related instance as first parameter instead of
TinyBuilder of related model
-
firstOrNew, firstOrCreate, find, firstWhere, firstWhereEq
Following methods was needed to implement for above methods:
where, whereEq and where(QVector<WhereItem> &)
Corresponding methods also added to Tiny/QueryBuilder.