On 9/27/07, Murray Cumming <[EMAIL PROTECTED]> wrote: > > On Thu, 2007-09-27 at 14:39 +0200, Vivien Malerba wrote: > > > > meaning it could not set the iter at the requested row, which is why > > > > it always returns the same value. The reason it returns FALSE is that > > > > it's not implemented (specifically the i_iter_at_row virtual method is > > > > not implemented). Of course it an iterator can move forward and > > > > backward, there could be a default implementation to move it to a > > > > desired row... > > > > > > I guess this should be implemented with FETCH ABSOLUTE. > > > http://www.postgresql.org/docs/8.2/static/sql-fetch.html > > > Does that seem appropriate? > > > > This could be implemented like that in the GdaPostgresCursorRecordset, yes. > > > > Otherwise for a more general approach (that is in > > gda_data_model_move_iter_at_row() which is called if no specific > > implementation exists) we just need to call > > gda_data_model_iter_move_{prev,next} as many times as requested (and > > in the case of the postgres cursor recordset there might even be no > > performance penalty at all because it fetches chunks of rows ar once). > > But wouldn't that mean that we have to fetch the data for 1000 rows (100 > chunks of 10, for instance) if I just want the data for row 1 and row > 1000?
You're right, I had not thought abou that... Then the only way is to use FETCH ABSOLUTE into the GdaPostgresCursorRecordset code. Vivien _______________________________________________ gnome-db-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-db-list
