[Interest] How to deal with database specific syntax

André Somers andre at familiesomers.nl
Fri Feb 13 09:12:41 CET 2015


pmqt71 schreef op 12-2-2015 om 21:51:
> My app does basic CRUD  operations, and most of them already are 
> compatible with different DBs.
> I just have problems in WHERE conditions when using date functions. A 
> part from this, anything works well.
> Also the binding of dates and datetimes are well supported.
> So, let me say, Qt covers 90% of basic CRUD operations for any SQL DB.
> I know it's not a Qt problem but an SQL problem, but I'd like some Qt 
> pseudofunctions, eg QT_DATEDIFF, that the driver would translate in 
> the specific SQL.
> Qt would have full support for CRUD operations DB indipendent.
> What do you think about?
>
> pm

I guess it could be done in much the same way. I'm not sure if doing 
actual replacements in the query string would be a good idea though.

André






More information about the Interest mailing list