[gnome-db] append row to data model.



Hello,

I see that many gda-data-model-xxxx calls have been changed (again .... again losing unproductive hours adapting to something that was already working rather than moving forward ... :(  ) 

Anyway ... If I look at the function gda_data_model_append_row() for instance. This used to have the arguments GdaDataModel and GdaRow. The last one containing the values you want to add to the data model and thus the database table. In the new situation the GdaRow argument has been removed. This means that this now only can append an empty line. I am using PostgreSQL and when executing this function it tries to insert a row into my table where all fields are NULL. Well, in most situations this is not allowed anyway, so where do we go with this function gda_data_model_append_row()? At the moment it is completely useless and dangerous for the database backend.

Btw, there is an error in gda_data_model_row_append_row where GdaRow *row is declared, but not initialized. 3 lines further is checks if it is not NULL, being not initialized it always exits here. I can provide a patch once I get some idea what is happening with the append.

As an alternative then there is a function gda_data_model_append_values (). This appears to work for the datamodel itself, since it is appending the row with the values, but nothing is done in the database table itself. There is no logic at the backend postgres provider, so it is useless at the moment as well.

Shouldn't we combine these 2 functions so we get gda_data_model_append_row_values (GdaDataModel *model, GList *values, GError **error) for instance? Then this logic can link in to the existing append_row logic that exists for the backends as postgresql and mysql.

Please advise as I have no way now to append new rows to my database.

Thanks,
Bas.




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