[Qt-interest] Asynchronous sql database queries

Stephen Collyer scollyer at netspinner.co.uk
Fri May 15 10:43:29 CEST 2009


2009/5/15 Антон Сердюков <uksus70 at gmail.com>

> Hello, everybody.
> AFAIK, the QtSql module does not support non-blocking (asynchronous)
> operations. However, executing sql statement does not take any CPU in
> Qt-application process. The CPU is spent within SQL server process. Thereby,
> there is no reason to block the thread. Is there any chance for QtSql module
> to have non-blocking, "qute-style" interface with signals? Or am I mistaken
> somewhere?
>

I guess this would require that all the DB libraries used by Qt support an
asynchronous interface of some kind (which is unlikely to be the case across
all supported DBs and platforms), or that Trolltech implement the DB
access logic in a hidden thread (which I suspect is undesirable for other
reasons). I don't think it's as straightforward as you assume.

-- 
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090515/33d18ed9/attachment.html 


More information about the Qt-interest-old mailing list