GNOME Bugzilla – Bug 421183
pygda does not wrap some essential functions
Last modified: 2007-03-27 18:11:04 UTC
This patch adds an argtype for GValue so that gda functions taking or returning a GValue* are wrapped by the code generator. There is still a problem with functions returning a GdaDataModel: The datamodel implementation depends on the provider. When calling gda_data_model_execute_select_command() on a connection with a postgresql provider, the actual type of the returned GdaDataModel is GdaPostgresRecordset. However, this is private API and users should work with the GdaDataModel interface. When a GdaDataModel is returned, pygda wants to wrap the actual type, but it fails, because it does not know anything about GdaPostgresRecordset. I am not sure how to fix that. A possible solution would be to define all the recordsets in gda.defs by hand and put the gda_postgres_recordset_get_type prototype and GDA_TYPE_POSTGRES_RECORDSET macro in gdaglue.h (for each provider libgda supports). The patch does not yet cover this because this approach seems like a bit of a hack to me. Perhaps someone comes up with a better idea.
Created attachment 85068 [details] [review] Adds an ArgType for GValue*
Feel free to apply the patch. I'll try to give the DataModel issue some thought.
This patch does not apply cleanly anymore. Could you please investigate, and apply what you need.
This patch is already committed to SVN. I cannot mark it as committed in bugzilla, though.
Thanks. Please ask for bug-closing permissions from the bugsquad.
The patch does not cover the problem with the GdaDataModel-returning functions, so it does not fully fix the problem.
I suspect that this is now fixed, after my recent changes. When you have a chance, could you check again, please.
Yes, this seems to be fixed now.