Re: Query Builder (PGA3) - Mailing list pgadmin-hackers

From Andreas Pflug
Subject Re: Query Builder (PGA3)
Date
Msg-id 3E999F92.5050305@web.de
Whole thread Raw
In response to Re: Query Builder (PGA3)  ("Dave Page" <dpage@vale-housing.co.uk>)
List 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


pgadmin-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Query Builder (PGA3)
Next
From: "frank_lupo"
Date:
Subject: PGA2 : rule on view and depending