Hi, Actually I don't think it's a Qt-related question but here's my approach to it.
Since you struggle with both syntaxes, you may want to try and encapsulate SQL code to stored procedures on the DB side and by that I mean not only simple data retrieval or updating but also the business logic. You are still obliged to support both DB backends but at least it will reduce the dependencies in your C++ program down to supporting the stored procedure call syntax which is pretty simple. Here you may also gain a performance boost since the data operations are as close to data as it can be. Regards Dmitriy Purgin 2015-02-11 18:54 GMT+06:00 pmqt71 <pmq...@gmail.com>: > Hi all, > > in my Qt application I've to duplicate sql instructions for MySql and > Postgres due to different sql syntax. > Most problems are on date types. For instance, MySql has DATEDIFF, > Postgres has EXTRACT, CAST... > > Without using ORMs, is there a way to manage specific sql syntax? > > > Thanks > pm > > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest