libgda r3294 - in trunk: . libgda/sqlite



Author: vivien
Date: Fri Jan 23 19:53:06 2009
New Revision: 3294
URL: http://svn.gnome.org/viewvc/libgda?rev=3294&view=rev

Log:
2009-01-23  Vivien Malerba <malerba gnome-db org>

	* sqlite/gda-sqlite-provider.c: partial fix for bug #568844


Modified:
   trunk/ChangeLog
   trunk/libgda/sqlite/gda-sqlite-provider.c

Modified: trunk/libgda/sqlite/gda-sqlite-provider.c
==============================================================================
--- trunk/libgda/sqlite/gda-sqlite-provider.c	(original)
+++ trunk/libgda/sqlite/gda-sqlite-provider.c	Fri Jan 23 19:53:06 2009
@@ -1792,6 +1792,7 @@
 			name = target->as;
 		else
 			name = target->table_name;
+		
 		if (gda_sql_identifier_needs_quotes (name)) {
 			gchar *tmp;
 			tmp = gda_sql_identifier_add_quotes (target->table_name);
@@ -1803,7 +1804,8 @@
 		g_value_take_string ((field->expr->value = gda_value_new (G_TYPE_STRING)), str);
 		
 		/* add to hash table */
-		g_hash_table_insert (hash, g_strdup (name), GINT_TO_POINTER (add_index));
+		g_hash_table_insert (hash, gda_sql_identifier_remove_quotes (g_strdup (name)),
+				     GINT_TO_POINTER (add_index));
 		nb_cols_added ++;
 	}
 	
@@ -1845,6 +1847,7 @@
 	real_stmt = add_oid_columns (stmt, &hash, &nb_rows_added);
 	sql = gda_sqlite_provider_statement_to_sql (provider, cnc, real_stmt, params, GDA_STATEMENT_SQL_PARAMS_AS_QMARK,
 						    &used_params, error);
+	g_print ("SQL: %s\n", sql);
 	if (!sql) 
 		goto out_err;
 



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