From: | Andreas Pflug <Andreas(dot)Pflug(at)web(dot)de> |
---|---|
To: | Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, pgadmin-hackers(at)postgresql(dot)org |
Subject: | Re: Query Builder (PGA3) |
Date: | 2003-04-13 17:34:10 |
Message-ID: | 3E999F92.5050305@web.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Dave Page wrote:
>The one architectural change I can think of is to make Andreas' query
>engine and grid into a simple control that we can place on a form and
>pass a query to, and then to do exactly that with his query tool, and
>the QB.
>
Querying code is extracted to a wxListView derived ctlSQLResult class.
Most of remaining frmQuery::executeQuery() code deals with status
information, insuring updated display (wxYield) and performance
optimization (Freeze/Thaw).
Basically, it's:
ctl->Execute();
while (ctl->RunningStatus() == CTLSQL_RUNNING)
do other stuff or take a nap;
if (ctl->RunningStatus() == PGRES_TUPLES_OK)
while (stillDataAvail)
{
chunksize=100;
rowsReadThisTurn=ctl->Retrieve(chunksize);
}
msg=ctl->GetMessages(); // show in messages window
errmsg=ctl->GetErrorMessages(); // put in status line
>I don't know if you've tried it, but his code is lightning fast.
>
>
Thanks for the bunch of flowers! :-)
Regards,
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | frank_lupo | 2003-04-14 14:23:54 | PGA2 : rule on view and depending |
Previous Message | Dave Page | 2003-04-12 21:42:38 | Re: Query Builder (PGA3) |