QxOrm 1.4.1 BETA : Test Mode

Open discussion on QxOrm library

QxOrm 1.4.1 BETA : Test Mode

Postby qxorm » Wed Oct 07, 2015 6:53 pm

Hello,

Here is the current BETA version of QxOrm library 1.4.1 : http://www.qxorm.com/version/QxOrm_1.4.1_BETA_96.zip
This BETA version should be close to the final QxOrm 1.4.1 release : no new feature, just bug fix or regression fix we could find in this BETA.
Any help to test and validate this version is appreciated :)

Here are the changes in version 1.4.1:

!!! IMPORTANT NOTE ABOUT THIS VERSION !!! : it is strongly recommended to read the QxOrm.pri configuration file of this new version (compilation options have changed compared to previous versions).
Now, by default, QxOrm library is a much lighter library : QxOrm depends only on QtCore and QtSql (boost serialization is now optional and not required by default).
By default, serialization engine is now based on Qt QDataStream class (but you can still enable boost serialization defining _QX_ENABLE_BOOST_SERIALIZATION compilation option in QxOrm.pri configuration file).
So now, with default options :
- QxOrm 1.4.1 is much easier to install because you don't have to deal with boost serialization extra dependency ;
- QxOrm 1.4.1 shared library is 3X smaller than 1.3.2 version ;
- Generated binaries which depends on QxOrm library are 25% smaller ;
- If you are not using serialization functions in current projects based on QxOrm library, then you can define or not _QX_ENABLE_BOOST_SERIALIZATION compilation option without changing any line of your source code.

Here are all other changes of version 1.4.1:
- Improve relationships engine : possibility to select columns to fetch using syntax : my_relation { col_1, col_2, etc... }
- Improve QxTraits module to reduce compilation times and build smaller binaries
- New compilation option _QX_ENABLE_BOOST_SERIALIZATION to enable boost serialization dependency (read QxOrm.pri configuration file for more details)
- New compilation option _QX_ENABLE_QT_NETWORK to enable QxService module (transfer persistent layer over network) : read QxOrm.pri configuration file for more details
- Support QDataStream Qt serialization engine (used by default when _QX_ENABLE_BOOST_SERIALIZATION compilation option is not defined)
- Improve qx_query class (SQL queries) : new method (named customOperator()) which gives the possibility to define a custom operator (for example <@ for PostgreSQL ltree type)
- Fix a program startup issue due to 'static initialization order fiasco' creating singletons (it was an issue with some compilers during the shared library link process)
- New namespace qx::dao::throwable : same functions as qx::dao namespace, but they throw a qx::dao::sql_error exception when a SQL error occurred (instead of returning a QSqlError instance)
- Add a qAssertMsg() macro to put a more explicit error message when throwing an assertion
- Include all *.inl files (template implementation) in QxOrm.pro project file : QtCreator can now index these *.inl files in its project treeview
- Rename QxStringCvt to QxConvert : so if you persist custom types to database, you have to rename from QxStringCvt_FromVariant, QxStringCvt_ToVariant to QxConvert_FromVariant, QxConvert_ToVariant


About this new feature : improve relationships engine : possibility to select columns to fetch using syntax : my_relation { col_1, col_2, etc... }
There is an example in the qxBlog sample project to show how to fetch relationships selecting columns :
Code: Select all
// Fetch relations defining columns to fetch with syntax { col_1, col_2, etc... }
list_blog lstBlogComplexRelation;
daoError = qx::dao::fetch_all_with_relation(QStringList() << "{ blog_text }" << "author_id { name, birthdate }" << "list_comment { comment_text } -> blog_id -> *", lstBlogComplexRelation);
qx::dump(lstBlogComplexRelation);
qAssert(lstBlogComplexRelation.size() > 0);
qAssert(lstBlogComplexRelation[0]->m_text != ""); // Fetched
qAssert(lstBlogComplexRelation[0]->m_dt_creation.isNull()); // Not fetched
qAssert(lstBlogComplexRelation[0]->m_author->m_sex == author::unknown); // Not fetched
qAssert(lstBlogComplexRelation[0]->m_author->m_name != ""); // Fetched
qAssert(lstBlogComplexRelation[0]->m_commentX.size() > 0);
qAssert(lstBlogComplexRelation[0]->m_commentX[0]->m_dt_create.isNull()); // Not fetched
qAssert(lstBlogComplexRelation[0]->m_commentX[0]->m_text != ""); // Fetched
qAssert(lstBlogComplexRelation[0]->m_commentX[0]->m_blog);
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: QxOrm 1.4.1 BETA : Test Mode

Postby qxorm » Mon Nov 02, 2015 11:12 am

UPDATE : here is a new BETA version of QxOrm 1.4.1 : http://www.qxorm.com/version/QxOrm_1.4.1_BETA_96.zip

And here is the changes log compared to BETA 75 :
- Check boost path in QxOrm.pri file : if boost path not valid, then an explicit error is displayed before generating the make files ;
- New compilation option _QX_NO_RTTI to build QxOrm without RTTI type information ;
- Syntax : empty { } to fetch relationships should not throw an assert now ;
- Syntax : relation { pk } should be ok now ;
- New alias qx_shared_ptr : equals to std::shared_ptr if _QX_CPP11_SMART_PTR option is defined, otherwise, equals to boost::shared_ptr (qx_shared_ptr is used internally by QxOrm library).
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am


Return to QxOrm - Open discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron