Re: [Interest] How to deal with database specific syntax

2015-02-13 Thread André Somers
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 we

Re: [Interest] How to deal with database specific syntax

2015-02-12 Thread pmqt71
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 bas

Re: [Interest] How to deal with database specific syntax

2015-02-12 Thread André Somers
Dmitriy Purgin schreef op 12-2-2015 om 08:04: > Exactly, that's what I meant by "supporting the stored procedure call > syntax". Sorry, it was a bit vague. Anyway, in this case you're > implementing a single interface for an SP call backed by multiple > "syntax handlers" which is much easier tha

Re: [Interest] How to deal with database specific syntax

2015-02-11 Thread Dmitriy Purgin
Exactly, that's what I meant by "supporting the stored procedure call syntax". Sorry, it was a bit vague. Anyway, in this case you're implementing a single interface for an SP call backed by multiple "syntax handlers" which is much easier than handling lots of syntactic differences for any kind of

Re: [Interest] How to deal with database specific syntax

2015-02-11 Thread alexander golks
Am Thu, 12 Feb 2015 08:59:18 +0600 schrieb Dmitriy Purgin : > 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

Re: [Interest] How to deal with database specific syntax

2015-02-11 Thread Dmitriy Purgin
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. Yo

Re: [Interest] How to deal with database specific syntax

2015-02-11 Thread Jason H
Sent: Wednesday, February 11, 2015 at 7:54 AM From: pmqt71 To: "Qt Project" Subject: [Interest] How to deal with database specific syntax 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

[Interest] How to deal with database specific syntax

2015-02-11 Thread pmqt71
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 __