[glom] Adapt to latest libgdamm API.



commit d99aeefdd5fd396a6583ff88e83242b44e830b56
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Jun 15 22:22:17 2010 +0200

    Adapt to latest libgdamm API.
    
    * glom/base_db.cc:
    * glom/libglom/db_utils.cc:
    * glom/libglom/python_embed/py_glom_relatedrecord.cc:
    * glom/libglom/utils.cc:
    * glom/utility_widgets/db_adddel/glom_db_treemodel.cc:
    SqlBuilder::add_field_id() was renamed to add_field_value_id(), though I now
    notice that no value is involved when it is used for SELECT queries.

 ChangeLog                                          |   12 ++++++++++++
 glom/base_db.cc                                    |    2 +-
 glom/libglom/db_utils.cc                           |    2 +-
 glom/libglom/python_embed/py_glom_relatedrecord.cc |    2 +-
 glom/libglom/utils.cc                              |    2 +-
 .../utility_widgets/db_adddel/glom_db_treemodel.cc |    2 +-
 6 files changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0162178..fc4a8cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-06-15  Murray Cumming  <murrayc murrayc com>
+
+	Adapt to latest libgdamm API.
+
+	* glom/base_db.cc:
+	* glom/libglom/db_utils.cc:
+	* glom/libglom/python_embed/py_glom_relatedrecord.cc:
+	* glom/libglom/utils.cc:
+	* glom/utility_widgets/db_adddel/glom_db_treemodel.cc: 
+	SqlBuilder::add_field_id() was renamed to add_field_value_id(), though I now 
+	notice that no value is involved when it is used for SELECT queries.
+
 2010-06-13  Murray Cumming  <murrayc murrayc com>
 
 	Remove unnecessary gtk C includes.
diff --git a/glom/base_db.cc b/glom/base_db.cc
index 42c7702..dc5c1fd 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -1902,7 +1902,7 @@ int Base_DB::count_rows_returned_by(const Glib::RefPtr<Gnome::Gda::SqlBuilder>&
   builder->select_add_target_id(target_id, "glomarbitraryalias");
 
   const guint id_function = builder->add_function("COUNT", builder->add_id("*"));
-  builder->add_field_id(id_function);
+  builder->add_field_value_id(id_function);
 
 
   int result = 0;
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index fa7c2df..d6c1ff5 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -1385,7 +1385,7 @@ static void recalculate_next_auto_increment_value(const Glib::ustring& table_nam
   Glib::RefPtr<Gnome::Gda::SqlBuilder> builder = Gnome::Gda::SqlBuilder::create(Gnome::Gda::SQL_STATEMENT_SELECT);
   std::list<guint> args;
   args.push_back(builder->add_id(table_name + "." + field_name));
-  builder->add_field_id(builder->add_function("MAX", args));
+  builder->add_field_value_id(builder->add_function("MAX", args));
   builder->select_add_target(table_name);
 
   Glib::RefPtr<Gnome::Gda::DataModel> datamodel = query_execute_select(builder);
diff --git a/glom/libglom/python_embed/py_glom_relatedrecord.cc b/glom/libglom/python_embed/py_glom_relatedrecord.cc
index 1aea8b2..d29b934 100644
--- a/glom/libglom/python_embed/py_glom_relatedrecord.cc
+++ b/glom/libglom/python_embed/py_glom_relatedrecord.cc
@@ -197,7 +197,7 @@ boost::python::object PyGlomRelatedRecord::generic_aggregate(const std::string&
     Gnome::Gda::SqlBuilder::create(Gnome::Gda::SQL_STATEMENT_SELECT);
 
   const guint id_function = builder->add_function(aggregate, builder->add_id(field_name)); //TODO: It would be nice to specify the table here too.
-  builder->add_field_id(id_function);
+  builder->add_field_value_id(id_function);
 
   builder->select_add_target(related_table);
   builder->set_where(
diff --git a/glom/libglom/utils.cc b/glom/libglom/utils.cc
index e6ed5f0..87f3a13 100644
--- a/glom/libglom/utils.cc
+++ b/glom/libglom/utils.cc
@@ -339,7 +339,7 @@ void Utils::build_sql_select_add_fields_to_get(const Glib::RefPtr<Gnome::Gda::Sq
       const guint id_function = builder->add_function(
         fieldsummary->get_summary_type_sql(),
         builder->add_id(layout_item->get_sql_name(table_name)) ); //TODO: It would be nice to specify the table here too.
-      builder->add_field_id(id_function);
+      builder->add_field_value_id(id_function);
     }
     else
     {
diff --git a/glom/utility_widgets/db_adddel/glom_db_treemodel.cc b/glom/utility_widgets/db_adddel/glom_db_treemodel.cc
index e9cd22d..3ae0dcf 100644
--- a/glom/utility_widgets/db_adddel/glom_db_treemodel.cc
+++ b/glom/utility_widgets/db_adddel/glom_db_treemodel.cc
@@ -907,7 +907,7 @@ void DbTreeModel::get_record_counts(gulong& total, gulong& found) const
         Gnome::Gda::SqlBuilder::create(Gnome::Gda::SQL_STATEMENT_SELECT);
 
       const guint id_function = builder->add_function("count", builder->add_id("*")); //TODO: Is * allowed here?
-      builder->add_field_id(id_function);
+      builder->add_field_value_id(id_function);
 
       builder->select_add_target(m_found_set.m_table_name);
 



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