Tags: QxOrm/QxOrm
Tags
QxOrm 1.5.0 release - Fix qx::dao::fetch_by_id_with_relation() when a table alias is used (table alias is now used in the WHERE part instead of table name) - Fix qx::IxDataMember::getType() method when used in a multi-thread environment - New method qx::IxSqlRelation::linkRelationKeyTo() for MongoDB database to simulate lazy loading for relationships (GitHub #107) - Fix qx::QxSqlDatabase and multi-thread issue when the OS assigns an old and destroyed thread identifier to a new one (GitHub #42) + add method qx::QxSqlDatabase::removeDatabaseByThread() to call at the end of a thread execution - Fix qx::QxSimpleCrypt class with Qt version >= 5.10 and error "Attempted to overwrite a QRandomGenerator to system() or global()" - Fix database not opened using async queries (GitHub #109)
QxOrm 1.4.9 release - Fix compilation issue with Qt 6.2+ (due to Qt JIRA : https://bugreports.qt.io/browse/QTBUG-92910), more details in GitHub issue #54 - Support QSqlQuery::execBatch() method to improve performance inserting/updating/deleting a list of C++ instances in database (new optional parameter 'bUseExecBatch' available for functions : qx::dao::insert, qx::dao::update, qx::dao::delete_by_id) - New method in qx::QxSqlQuery class named setFctOnBeforeSqlPrepare() to define a custom callback function to modify SQL query before preparing in database - New callbacks functions available in qx::IxDataMember interface to customize SQL generated per data member (see an example in ./test/qxBlogCompositeKey/src/blog.cpp file) - Fix an issue in qx::QxSqlRelationLinked::hierarchyResolveOutput() which could call getIdFromQuery() for nothing, which could generate some warnings in Qt SQL driver (for example : QPSQLResult::data: column XX out of range) - Fix a compilation issue of QxRestApi and QxHttpTransaction modules with Qt QStringBuilder option enabled (GitHub issues #50, #83) - Improve SQL DISTINCT to support relationships (unit test available in qxBlog sample project) - New feature to fetch relationships only in LEFT OUTER/INNER JOIN and WHERE clauses (so no columns in SELECT part) : use {NULL} syntax to define no relation columns in SELECT part (unit test available in qxBlog sample project) - Fix a crash which could occur using qx::QxSession and multi-threaded environment - Add a new parameter caseSensitive (default value : false) to the method qx::QxSqlQuery::getSqlResultAt() - Fix an issue with JSON REST API (QxRestApi module) and MongoDB database (more details in GitHub issue #70) - Improve qx::QxClassX::registerAllClasses() : init all validator instances (can fix some issues in a multi-thread environment) - New settings available in the qx::QxSqlDatabase singleton class (setSqlDelimiterForTableNameAlias() and setSqlDelimiterForColumnNameAlias()) to add delimiters to SQL aliases (more details in GitHub issue #57) - Fix linking error which could occur with Qt6 and MSVC2019 (should fix GitHub issues #98, #91, #89, #90, #62, #65) - Fix all checks with QT_VERSION (using macro QT_VERSION_CHECK), should fix checks from Qt 5.10 to Qt 5.15 (GitHub issue #81)
QxOrm 1.4.8 release - Support Qt6 (tested with MSVC 2019 + CMake 3.19 on Windows) ==> QxOrm library is compatible with Qt4, Qt5 and Qt6 - Support PIMPL idiom for persistent classes (useful to reduce compilation times, to provide a stable ABI, ascendant compatibility for shared libraries, to reduce binaries size) - Documentation about PIMPL idiom for persistent classes : https://www.qxorm.com/qxorm_en/manual.html#manual_455 - New sample project named qxBlogPImpl in ./test/ directory of QxOrm package to show how to implement persistent classes using the PIMPL idiom - Possibility to ignore soft delete behavior during a session execution (useful to fetch logical deleted instances for example) : qx::QxSession::ignoreSoftDelete() - Fix SQL DISTINCT keyword in qx::QxSqlQuery class (when DISTINCT is used, then the primary key is not fetched) - Fix an issue which could happen after enabling _QX_ENABLE_QT_NETWORK compilation option (due to QT_NO_SSL/QT_NO_OPENSSL used in QxThread.cpp file) - Fix an issue in qx::QxSqlDatabase and multi-thread context when a thread identifier is reused (GitHub issue #42) - Add new behavior to qx::QxSession class with setAutoRollbackWhenDestroyed() option : if true, then database rollback is called when session instance destructor (or close() method) is invoked (instead of commit by default, GitHub issue #43)
QxOrm 1.4.7 release - Fix a MongoDB issue with qx::dao::fetch_by_id_with_relation() (wrong id fetched) - Fix an issue with qx::dao::fetch_all when a custom list of columns with the primary key is used - Fix identifier JSON serialization for MongoDB with properties registered as Q_PROPERTY (Qt property meta system) - Fix a crash (seg fault) using qx::IxPersistable with multiple inheritance (for example QObject + qx::IxPersistable) due to some static_cast to void * in QxFactory module (fix also for QxService module and multiple inheritance) - Remove automatic relationship lazy fetch when not requested in query - Fix an issue with QJson and QDataStream serialization when class doesn't contain any identifier (so not a database class) and is a wrapper of another registered class (can have same address pointer as parent) - Improve qx::QxSqlQuery::freeText() method to add custom text to build SQL query : support placeholders (add second parameter const QVariantList & values) - Improve performance in a multi-threads environment (mutex in qx::IxSqlQueryBuilder) - New setting to display more details (execution times) in qx::dao functions logs (to enable this new feature : qx::QxSqlDatabase::getSingleton()->setDisplayTimerDetails(true)) - Improve MongoDB integration to fetch a list of items : build C++ instances as soon as possible without putting data in a buffer (better performance + less memory usage) - Improve MongoDB integration : support qx::dao::delete_by_query() function with MongoDB aggregation framework - Improve qx::QxSqlQuery class (or its qx_query alias) : new addJoinQuery() method to insert SQL sub-queries inside LEFT OUT JOIN / INNER JOIN (more details in documentation here : https://www.qxorm.com/qxorm_en/manual.html#manual_3855) - Improve qx::QxSqlQuery class : new constructors with placeholders support + new methods to embed SQL sub-queries (in_Select, notIn_Select, isEqualTo_Select, isNotEqualTo_Select) - Improve qx::QxCollection class : qx::QxCollection is now a thread-safe container (fix for example QxModelView module when model is fetched in a different thread than the view)
QxOrm 1.4.6 release - New QxHttpServer module : C++/Qt standalone multi-threaded HTTP 1.1 web server (support SSL/TLS, persistent connections, cookies, sessions, chunked responses, URL dispatcher/routing, no other dependency except QtNetwork) : https://www.qxorm.com/qxorm_en/manual.html#manual_96 - New QxRestApi module : provide a REST API to send requests in JSON format from external application (web services), from web-site (written in Angular for example), from QML or from scripting langage (like Python) : https://www.qxorm.com/qxorm_en/manual.html#manual_97 - With QxHttpServer and QxRestApi modules, QxOrm library can now be used to create web applications, especially single-page applications (SPA) with famous Javascript frameworks like AngularJS, React, Meteor.js, etc... - New project example named qxBlogRestApi : QML application with a list of REST requests to show how to send JSON queries from Javascript to QxRestApi module + HTTP web server application to show how to create web applications using QxHttpServer module - QxRestApi module supports : all CRUD operations, complex queries, several levels of relationships, custom JSON output format, call dynamically native C++ functions registered in QxOrm context, instance validation, call custom database queries - Improve JSON serialization engine : possibility to define a custom filter to not export all properties (https://www.qxorm.com/qxorm_en/manual.html#manual_606) - Possibility to define a custom SQL table alias for complex queries with relationships using syntax <my_table_alias> (https://www.qxorm.com/qxorm_en/manual.html#manual_3850) - Improve SQL generator for Oracle database : manage last insert id using RETURNING INTO syntax (thx to Romain Macureau and Abdennour Boutrig) - Fix an issue with stored procedure and output parameters - New function available : qx::dao::count_with_relation<T>() - Fix JSON serialization in multi-thread environment - Change JSON QDateTime and QTime serialization format : use Qt::ISODateWithMs instead of Qt::ISODate (Qt 5.8 or +) - Improve QxService module : support SSL/TLS secure connections + keep-alive connections - Remove *.suo files (MSVC++ temporary project files) from QxOrm package
QxOrm 1.4.5 release - Support MongoDB database : QxOrm library becomes a C++/Qt Object Document Mapper ODM library ! - For more details about MongoDB integration, see QxOrm manual (https://www.qxorm.com/qxorm_en/manual.html#manual_95) and new sample project available in ./test/qxBlogMongoDB/ directory - QxOrm library is now available on GitHub (official repository) : https://github.com/QxOrm/QxOrm - Fix an issue in qx::IxSqlQueryBuilder class when QxOrm library is used in a multi-thread environment - Support latest version of boost (1.66) - Update boost portable binary serialization classes to version 5.1 (provided by https://archive.codeplex.com/?p=epa) - Fix an issue building SQL query for Oracle database (doesn't support AS keyword for table alias) - Improve qx::QxClassX::registerAllClasses() function : possibility to initialize all relations (useful to work with introspection engine) - Improve qx::IxPersistable interface : provide new methods toJson() / fromJson() - Improve documentation/website : change http://www.qxorm.com by https://www.qxorm.com everywhere - Fix fetching relations with soft delete putting SQL condition in the JOIN part instead of WHERE part - Fix SQL generator for Oracle database : use new limit/pagination syntax (version Oracle > 12.1) - Improve SQL generator interface : add 'onBeforeSqlPrepare()' method to modify/log SQL queries in custom classes - Add an option in qx::QxSqlDatabase class to format SQL query (pretty-printing) before logging it (can be customized creating a qx::dao::detail::IxSqlGenerator sub-class) - Fix an issue with boost/std::optional (to manage NULL database values) and some databases : if optional is empty, then create a NULL QVariant based on QVariant::Type - Add an option in qx::QxSqlDatabase class to insert square brackets (or any other delimiters) in SQL queries for table name and/or column name (to support specific database keywords) - Improve introspection engine : add getType() method in qx::IxDataMember interface to get C++ type of a property dynamically - Improve qx::QxSqlDatabase singleton settings class to make easier working with several databases : now there are 3 levels of settings : global >> per thread >> per database (see 'bJustForCurrentThread' and 'pJustForThisDatabase' optional parameters in all setXXXX() methods) - Fix QxOrm.pri for MinGW compiler on Windows : an issue could occurred to export some symbols from shared library (some Qt signals for example) - Add an option in qx::QxSqlDatabase singleton class to display only slow SQL queries (see setTraceSqlOnlySlowQueriesDatabase() and setTraceSqlOnlySlowQueriesTotal() methods)
QxOrm 1.4.4 release QxOrm library doesn't depend on boost framework anymore (the boost dependency has been fully removed, replaced by some C++11 features). So QxOrm library is now a pure Qt library which depends only on QtCore and QtSql by default. For backward compatibility, QxOrm library still supports some boost classes (boost smart-pointers, unordered containers, boost::optional, etc...) : you have to define _QX_ENABLE_BOOST compilation option to enable these features. Main advantages are : - QxOrm becomes a much lighter library - easier to install (because you don't have to deal with boost anymore) - reduce compilation times - reduce output binary size Thx also to Jimmy Taker for several improvments and new features in QxModelView module ! - QxOrm library now requires a C++11 compiler (please note that QxOrm doesn't require a full compliant C++11 compiler : for example, QxOrm can be built and used with MSVC 2012, GCC 4.5 or Clang 3.2) - Implement PIMPL idiom for some QxOrm classes to reduce compilation times and output binary size - New class named qx::any to replace boost::any (basic implementation of boost::any written by Kevlin Henney) - qx_shared_ptr alias doesn't exist anymore : it is replaced everywhere by std::shared_ptr - QxModelView module : all models based on qx::IxModel class can now be sorted (on all columns), please note that you can also use QSortFilterProxyModel Qt class to sort your model - QxModelView module - qx::QxModel<T> : fix setData() with e_auto_update_on_field_change option when an error occurred saving data in database, now previous value is restored if an error occurred - QxModelView module - qx::IxModel : fix setHeaderData() using it with default role (Qt::EditRole) changes the header in a header view (role Qt::DisplayRole) - QxModelView module - qx::IxModel : if a description is registered in QxOrm context, then it is displayed in header for each property - QxModelView module : new feature available to add automatically an empty row at the end of the table to insert quickly new items (setShowEmptyLine() method) - QxModelView module : possibility to define an intermediate base class between qx::IxModel and qx::QxModel<T> to provide your own model features, for example imagine you develop a drag&drop feature in a class named IxModelDragDrop, you can now create a QxOrm model like this (see the second template parameter) : qx::IxModel * pModel = new qx::QxModel<MyPersistantClass, IxModelDragDrop>(); - QxOrm.pro : fix DESTDIR parameter on Windows - QxOrm.pri and QxOrm.cmake : add a section to enable QT_USE_QSTRINGBUILDER to optimize QString operations - QxOrm library is now tested with MSVC 2015 compiler (support all MSVC versions from 2012) - Fix a bug in QxSqlError.h file with a qPrintable() call on a temporary object - Provide more details in logs after executing a SQL query : time to execute query in database + time to fetch C++ instances - Support std::optional<T> (if your compiler supports C++17 features) to manage NULL database value : new header available named <QxExtras/QxStdOptional.h> to include just after <QxOrm.h> header file (ideally in a precompiled header)