Re: where are the query output tuples stored

From: Qiqi YU <vonclemay(at)gmail(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: rod(at)iol(dot)ie, Pgadmin-Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: where are the query output tuples stored
Date: 2011-03-15 10:01:09
Message-ID: AANLkTimeUDP9bquuzxmdHMe9d9nAsZ4Y_byrhuk26Ur+@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

2011/3/14 Dave Page <dpage(at)pgadmin(dot)org>:
> On Mon, Mar 14, 2011 at 2:39 PM, Qiqi YU <vonclemay(at)gmail(dot)com> wrote:
>> Hi Dave,
>>
>> Thanks for your fast reply. As I went through the code of function
>> ctlSQLResult::DisplayData(bool single), there seems to be no calling
>> of wxGrid Control to display data?  My understanding is that the
>> displayData function would set up the frame of the outputs (i.e. all
>> the column attributes name and row number). But where is the output
>> data being inserted into the output table?
>
> It's not - you've got it backwards. The grid control calls
> sqlResultTable::GetValue() whenever it wants to render a cell. That
> function returns the text to display.

For this part, I still can't get it. There are two parts of the
codes, executeQuery and onQueryComplete. The displayData function is
called inside onQueryComplete, so is that pgadmin would call grid
control to insert data after it has called the function displayData?

>> Also the thing is I need to create to new tuples to the output panel
>> (appended to the existing output table). Which part of the codes
>> should I modify in order to achieve this?
>
> You'd need to modify sqlResultTable::GetValue() to give it the ability
> to return the additional data, and sqlResultTable::GetNumberRows() to
> return the right number of rows. It will be somewhat difficult though
> as the code is designed to be able to show partial resultsets - that
> is it may start returning rows for the grid to display before the
> entire recordset has been transferred from the server.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2011-03-15 10:44:09 Re: where are the query output tuples stored
Previous Message Guillaume Lelarge 2011-03-15 09:28:07 Re: [pgadmin-support] Copy & paste - git