[glom] Remove hacks that are now obsolete with libgda 4.0.4 and libgdamm 3.99.17.1 on maemo



commit a92a96e68c44a7391e95de97b3c6b1679011e086
Author: Johannes Schmid <jhs gnome org>
Date:   Tue Sep 1 09:57:52 2009 +0200

    Remove hacks that are now obsolete with libgda 4.0.4 and libgdamm 3.99.17.1 on maemo

 ChangeLog                                        |    9 +++++++++
 glom/base_db.cc                                  |    2 --
 glom/libglom/connectionpool_backends/postgres.cc |    4 ++--
 3 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 28a8df2..66baef8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-09-01  Johannes Schmid  <jschmid openismus com>
+
+	* glom/libglom/connectionpool_backends/postgres.cc:
+	Also use SQL_IDENTIFIERS_CASE_SENSITIVE on maemo
+	* glom/base_db.cc:
+	enable the use gda_meta_store_sql_identifier_quote() on maemo
+
+	These were hacks used before libgda 4.0.4 was available on maemo
+
 2009-08-31  David King  <davidk openismus com>
 
 	Revert "Really never use config.h in libglom."
diff --git a/glom/base_db.cc b/glom/base_db.cc
index 92d233b..0a867f2 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -629,7 +629,6 @@ Base_DB::type_vec_fields Base_DB::get_fields_for_table_from_database(const Glib:
     Glib::RefPtr<Gnome::Gda::Connection> connection = sharedconnection->get_gda_connection();
 
     Glib::RefPtr<Gnome::Gda::Holder> holder_table_name = Gnome::Gda::Holder::create(G_TYPE_STRING, "name");
-#ifndef GLOM_ENABLE_MAEMO // TODO: Requires libgda(mm) trunk
     gchar* quoted_table_name_c = gda_meta_store_sql_identifier_quote(table_name.c_str(), connection->gobj());    
     g_assert(quoted_table_name_c);
     Glib::ustring quoted_table_name(quoted_table_name_c);
@@ -637,7 +636,6 @@ Base_DB::type_vec_fields Base_DB::get_fields_for_table_from_database(const Glib:
     quoted_table_name_c = 0;
 
     holder_table_name->set_value(quoted_table_name);
-#endif
 
     std::list< Glib::RefPtr<Gnome::Gda::Holder> > holder_list;
     holder_list.push_back(holder_table_name);
diff --git a/glom/libglom/connectionpool_backends/postgres.cc b/glom/libglom/connectionpool_backends/postgres.cc
index 90f9c73..a0ceeff 100644
--- a/glom/libglom/connectionpool_backends/postgres.cc
+++ b/glom/libglom/connectionpool_backends/postgres.cc
@@ -100,7 +100,7 @@ Glib::RefPtr<Gnome::Gda::Connection> Postgres::attempt_connect(const Glib::ustri
   std::auto_ptr<Glib::Error> ex;
   connection = Gnome::Gda::Connection::open_from_string("PostgreSQL", 
     cnc_string, auth_string,
-    Gnome::Gda::CONNECTION_OPTIONS_READ_ONLY,
+    Gnome::Gda::CONNECTION_OPTIONS_READ_ONLY | Gnome::Gda::CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE,
     ex);
   
   if(!ex.get())
@@ -133,7 +133,7 @@ Glib::RefPtr<Gnome::Gda::Connection> Postgres::attempt_connect(const Glib::ustri
 #else
     temp_conn = Gnome::Gda::Connection::open_from_string("PostgreSQL", 
       cnc_string, auth_string, 
-      Gnome::Gda::CONNECTION_OPTIONS_READ_ONLY, ex);
+      Gnome::Gda::CONNECTION_OPTIONS_READ_ONLY | Gnome::Gda::CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE, ex);
 #endif
 
 #ifdef GLOM_CONNECTION_DEBUG



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