View Full Version : QSql connection pool manager

22nd April 2014, 17:49
I am writing a application that gets data from a MYSQL database, now I have only one connection and everything is done "one by one" but meany of those operations can by made in parallel so I decided to create a connection pool with ~5 connections and then use them in parallel. like

thread1.exec("select * from x");
thread2.exec("select col1,col2 from y");


while (thread1.next()){ ... }
while (thread1.next()){ ... }

As far as I know I can use for this purpose QThreadPool and some other "magic" to hold each connection in separate thread, and then do some query on those connections, but in first place I want to ask if somebody know something about a simple library written for Qt that does this king of stuff?

**** EDIT ***
I've managed to do something like i wanted using http://www.linuxjournal.com/article/9602?page=0,0, but still waiting for a library ;)