Обсуждение: Query Builder (PGA3)
Dave/Andreas/Mark, The query builder for PGA3 is now nearing completion. Most of the functionality exists and has been for the most part debugged. As a result, I have updated CVS with the newest changes and added a couple of files (resources and icons). Your input is welcome. Any major architectural changes or paradigm shifts should happen now, so please let me know if you see a big pitfall coming. * Drag and Drop functionality for Joins and for adding columns to the design view both function (although a little bit sensitive on the initial drag still). * Joins are fully functional, except that you can't click on the join line and modify/delete it (which is on my list). Also, CROSS JOINS will not function (they currently act like INNER/OUTER joins). * Nested Joins seem to work fine, although double-right handed joins are not allowed (error message advises user to redraw the relationship). * Table/View children have a new streamlined look. Closing them no longer causes exceptions when there are joins. Better cleanup code all around. * Formatting for the SQL box makes the outputted Query easily readable. * Lots of stuff left to do ... such as Unions, Ordering and Limits. -Keith
> -----Original Message----- > From: efesar [mailto:efesar@nmia.com] > Sent: 12 April 2003 05:39 > To: Pgadmin-Hackers > Subject: [pgadmin-hackers] Query Builder (PGA3) > > > > Dave/Andreas/Mark, > > The query builder for PGA3 is now nearing completion. Most of > the functionality exists and has been for the most part > debugged. As a result, I have updated CVS with the newest > changes and added a couple of files (resources and icons). Cool, will take a look when I get time. It's still pretty limited, but I have managed a few updates as I've been checking the Schema Browser and SQL generation as Andreas requested :-) > Your input is welcome. Any major architectural changes or > paradigm shifts should happen now, so please let me know if > you see a big pitfall coming. 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. I don't know if you've tried it, but his code is lightning fast. Regards, Dave.
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