glom r1861 - in trunk: . glom glom/libglom/data_structure
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1861 - in trunk: . glom glom/libglom/data_structure
- Date: Mon, 26 Jan 2009 17:26:29 +0000 (UTC)
Author: murrayc
Date: Mon Jan 26 17:26:29 2009
New Revision: 1861
URL: http://svn.gnome.org/viewvc/glom?rev=1861&view=rev
Log:
2009-01-26 Murray Cumming <murrayc murrayc com>
* glom/base_db.cc: get_fields_for_table_from_database(),
auto_increment_insert_first_if_necessary(),
get_next_auto_increment_value(), insert_example_data():
* glom/libglom/data_structure/field.cc: get_holder(): Adapt to
my set_value()/set_value_as_value() changes in libgdamm to slightly
simply the code. I guess that a better add_param() method could
simplify it more.
Modified:
trunk/ChangeLog
trunk/glom/base_db.cc
trunk/glom/libglom/data_structure/field.cc
Modified: trunk/glom/base_db.cc
==============================================================================
--- trunk/glom/base_db.cc (original)
+++ trunk/glom/base_db.cc Mon Jan 26 17:26:29 2009
@@ -534,8 +534,7 @@
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");
- Gnome::Gda::Value value(table_name);
- holder_table_name->set_value(value);
+ holder_table_name->set_value(table_name);
std::list< Glib::RefPtr<Gnome::Gda::Holder> > holder_list;
holder_list.push_back(holder_table_name);
@@ -906,8 +905,8 @@
Glib::RefPtr<Gnome::Gda::Set> params = Gnome::Gda::Set::create();
Glib::RefPtr<Gnome::Gda::Holder> holder_table_name = Gnome::Gda::Holder::create(G_TYPE_STRING, "table_name");
Glib::RefPtr<Gnome::Gda::Holder> holder_field_name = Gnome::Gda::Holder::create(G_TYPE_STRING, "field_name");
- holder_table_name->set_value(Gnome::Gda::Value(table_name));
- holder_field_name->set_value(Gnome::Gda::Value(field_name));
+ holder_table_name->set_value(table_name);
+ holder_field_name->set_value(field_name);
params->add_holder(holder_table_name);
params->add_holder(holder_field_name);
@@ -992,8 +991,8 @@
Glib::RefPtr<Gnome::Gda::Holder> holder_table_name = Gnome::Gda::Holder::create(G_TYPE_STRING, "table_name");
Glib::RefPtr<Gnome::Gda::Holder> holder_field_name = Gnome::Gda::Holder::create(G_TYPE_STRING, "field_name");
Glib::RefPtr<Gnome::Gda::Holder> holder_next_value = Gnome::Gda::Holder::create(G_TYPE_STRING, "next_value");
- holder_table_name->set_value(Gnome::Gda::Value(table_name));
- holder_field_name->set_value(Gnome::Gda::Value(field_name));
+ holder_table_name->set_value(table_name);
+ holder_field_name->set_value(field_name);
holder_next_value->set_value(next_value);
params->add_holder(holder_table_name);
params->add_holder(holder_field_name);
@@ -1558,7 +1557,7 @@
strNames += vec_fields[i]->get_name();
bool success = false;
- Gnome::Gda::Value value = vec_fields[i]->from_sql(vec_values[i], Field::SQL_FORMAT_POSTGRES, success);
+ const Gnome::Gda::Value value = vec_fields[i]->from_sql(vec_values[i], Field::SQL_FORMAT_POSTGRES, success);
if(!success)
{
std::cerr << "Base_DB::insert_example_data: could not convert example data" << std::endl;
@@ -1571,7 +1570,7 @@
param_name);
holder->set_not_null(false);
- holder->set_value(value);
+ holder->set_value_as_value(value);
params->add_holder(holder);
strVals += "##" + param_name + "::" + vec_fields[i]->get_gda_type();
Modified: trunk/glom/libglom/data_structure/field.cc
==============================================================================
--- trunk/glom/libglom/data_structure/field.cc (original)
+++ trunk/glom/libglom/data_structure/field.cc Mon Jan 26 17:26:29 2009
@@ -750,7 +750,7 @@
Glib::ustring real_name = name.empty() ? get_name() : name;
Glib::RefPtr<Gnome::Gda::Holder> holder = Gnome::Gda::Holder::create(get_gda_g_type(),
real_name);
- holder->set_value(get_data());
+ holder->set_value_as_value(get_data());
return holder;
}
Glib::ustring Field::get_gda_holder_string(const Glib::ustring& name) const
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]