Re: [gnome-db] libgda cursor support



> > 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).

Vivien



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]