On 5/25/07, Murray Cumming <[EMAIL PROTECTED]> wrote: > I believe that libgda theoretically allows the use of cursors instead of > getting the whole query result at once. I don't know what API would > actually be used for this - an example would be nice. > > But I don't think that any of the libgda providers actually implement > this. Does anyone have plans to do this, or can anyone suggest how it > should be done? This seems to be the relevant bug: > http://bugzilla.gnome.org/show_bug.cgi?id=318742
The default is if you don't specify a data access method, then a random access data model is returned (possibly consuming a lot of mem) which allows random access and of course cursor access. If you want a data model which is based on cursors only (no random access then), you need to set a parameter named "ITER_MODEL_ONLY" of type boolean to TRUE which is given to the gda_connection_execute_command() family functions as the @params attribute. The same is true for the gda_query_execute() function. This function then in the end calls gda_server_provider_execute_command() which is passed the same @params list of parameters. Each DBMS provider is then free to treat that parameter or ignore it (as is currently the case). If a provider chooses to honor that request, then the associated data model needs to be improved to support cursor based nabigation (for example for PostgreSQL, the GdaPostgresRecordset object needs to be modified). I could provide a sample implementation using for instance PostgeSQL or SQLite if you want, but not right away as I'm currently doing something else (working on a gda-sql command line tool similar to psql). However this is next on my TODO list. Cheers, Vivien _______________________________________________ gnome-db-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-db-list
