Re: [gnome-db] How to get changes into 1.2 version/branch.



On Wed, 2005-01-12 at 14:19 +0100, Vivien Malerba wrote:
> On Wed, 12 Jan 2005 09:59:34 +1000, Bas Driessen <bas driessen xobas com> wrote:
> >  Hello,
> >  
> >  I understand that you will split up the versions in 1.2 and 2.0 (or
> > something similar). Since it probably will take a while for that new 2.0
> > version to become a release, I would like to have the Postgres changes I
> > have made in the last couple of days in the 1.2 branch (assuming that there
> > will be a 1.2.1 release at some point) and of course in version after that.
> > Do I need to provide new patches for that? If so, what do I need to do?
> > Retrieve a 1.2 branch from cvs and apply it against that? How do I retrieve
> > this 1.2 branch in that case using which cvs command? Please advise.
> >  
> >  The pending patches (= send to your list, but not committed or commented
> > on) are :
> >  
> >  implementation of the non-existing Postgres remove_row method (patch
> > pre-gda_data_model overhaul) (mail 8/1/2005)
> >  changes to the not working Postgres update_row method (patch
> > post-gda_data_model overhaul) (mail 11/1/2005)
> >  
> 
> The patches should also be commited to cvs HEAD.
> 

Ok, so not sure if this meant that the ball was back in my corner. If
so, please find attached the row-update patch for both head as 1.2. 

The other patch was created before the split of 1.2 and head, but if
required I can create them for both.

Thanks,
Bas.


--- ChangeLog.orig	2005-01-14 15:47:31.760221164 +1000
+++ ChangeLog	2005-01-14 15:48:28.524491784 +1000
@@ -1,3 +1,11 @@
+2005-01-11  Bas Driessen <bas driessen xobas com>
+
+	* providers/postgres/gda-postgres-recordset.c
+	(gda_postgres_recordset_update_row):
+	use " for field names in 'SET' part of query.
+	remove unnecessary call to non-existent function gda_data_model_hash_update_row.
+	emit appropriate 'updated' and 'changed' signals.
+
 2005-01-07  Bas Driessen <bas driessen xobas com>
 
 	* libgda/gda-data-model-hash.c (gda_data_model_hash_append_row):
--- providers/postgres/gda-postgres-recordset.c.orig	2005-01-14 15:50:42.236929200 +1000
+++ providers/postgres/gda-postgres-recordset.c	2005-01-14 15:51:22.716704161 +1000
@@ -385,7 +385,7 @@
 		/* non-unique column: update it */
 		else {
 			/* fills the 'set' part of the update command */
-			tmp = g_strdup_printf ("%s = '%s', ", 
+			tmp = g_strdup_printf ("\"%s\" = '%s', ", 
 					       column_name,
 					       newval);
 			query_set = g_strconcat (query_set, tmp, NULL);
@@ -438,8 +438,9 @@
 	g_free (query_set);
 	g_free (query_where);
 
-	if (status == TRUE)
-               status = GDA_DATA_MODEL_CLASS (parent_class)->update_row (model, row);
+	/* emit update signals */
+	gda_data_model_row_updated (GDA_DATA_MODEL (model), gda_row_get_number ((GdaRow *) row));
+	gda_data_model_changed (GDA_DATA_MODEL (model));
 
 	return status;
 }
--- ChangeLog.orig	2005-01-14 15:41:44.719559820 +1000
+++ ChangeLog	2005-01-14 15:42:54.209901986 +1000
@@ -1,3 +1,11 @@
+2005-01-11  Bas Driessen <bas driessen xobas com>
+
+	* providers/postgres/gda-postgres-recordset.c
+	(gda_postgres_recordset_update_row):
+	use " for field names in 'SET' part of query.
+	remove unnecessary call to non-existent function gda_data_model_hash_update_row.
+	emit appropriate 'updated' and 'changed' signals.
+
 2005-01-09  Vivien Malerba <malerba gnome-db org>
 	* libgda/: Implemented GdaDataModel as an interface, and added a GdaDataModelBase class to serve
 	  as a base class in relpacement of the previous GdaDataModel
--- providers/postgres/gda-postgres-recordset.c.orig	2005-01-14 15:43:15.626610388 +1000
+++ providers/postgres/gda-postgres-recordset.c	2005-01-14 15:44:34.236521408 +1000
@@ -386,7 +386,7 @@
 		/* non-unique column: update it */
 		else {
 			/* fills the 'set' part of the update command */
-			tmp = g_strdup_printf ("%s = '%s', ", 
+			tmp = g_strdup_printf ("\"%s\" = '%s', ", 
 					       column_name,
 					       newval);
 			query_set = g_strconcat (query_set, tmp, NULL);
@@ -439,8 +439,9 @@
 	g_free (query_set);
 	g_free (query_where);
 
-	if (status == TRUE)
-		status = GDA_DATA_MODEL_BASE_CLASS (parent_class)->update_row (model, row);
+	/* emit update signals */
+	gda_data_model_row_updated (GDA_DATA_MODEL (model), gda_row_get_number ((GdaRow *) row));
+	gda_data_model_changed (GDA_DATA_MODEL (model));
 
 	return status;
 }


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