[glom] libglom: Remove LayoutItem_Field::get_sql_name().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] libglom: Remove LayoutItem_Field::get_sql_name().
- Date: Tue, 8 Nov 2011 14:22:16 +0000 (UTC)
commit d0d78555248148237705a411d48280276354d237
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Nov 8 14:30:46 2011 +0100
libglom: Remove LayoutItem_Field::get_sql_name().
* glom/libglom/utils.cc: build_sql_select_add_fields_to_get():
Use SqlBuilder::add_field_id() instead of
LayoutItemField::get_sql_name().
* glom/libglom/data_structure/layout/layoutitem_field.[h|cc]:
Remove the now unused get_sql_name() method.
ChangeLog | 10 ++++++++++
.../data_structure/layout/layoutitem_field.cc | 6 ------
.../data_structure/layout/layoutitem_field.h | 4 ----
glom/libglom/utils.cc | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0f63ff1..3472049 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2011-11-08 Murray Cumming <murrayc murrayc com>
+ libglom: Remove LayoutItem_Field::get_sql_name().
+
+ * glom/libglom/utils.cc: build_sql_select_add_fields_to_get():
+ Use SqlBuilder::add_field_id() instead of
+ LayoutItemField::get_sql_name().
+ * glom/libglom/data_structure/layout/layoutitem_field.[h|cc]:
+ Remove the now unused get_sql_name() method.
+
+2011-11-08 Murray Cumming <murrayc murrayc com>
+
libglom: Use escape_sql_id() for column add/crop/change.
* glom/libglom/connectionpool.cc: add_column(), drop_column(),
diff --git a/glom/libglom/data_structure/layout/layoutitem_field.cc b/glom/libglom/data_structure/layout/layoutitem_field.cc
index 638a1cd..484bf49 100644
--- a/glom/libglom/data_structure/layout/layoutitem_field.cc
+++ b/glom/libglom/data_structure/layout/layoutitem_field.cc
@@ -324,12 +324,6 @@ bool LayoutItem_Field::is_same_field(const sharedptr<const LayoutItem_Field>& fi
(*uses_a == *uses_b);
}
-Glib::ustring LayoutItem_Field::get_sql_name(const Glib::ustring& parent_table) const
-{
- return "\"" + get_sql_table_or_join_alias_name(parent_table) + "\".\"" + get_name() + "\"";
-}
-
-
} //namespace Glom
diff --git a/glom/libglom/data_structure/layout/layoutitem_field.h b/glom/libglom/data_structure/layout/layoutitem_field.h
index 3d378a3..c9d84bb 100644
--- a/glom/libglom/data_structure/layout/layoutitem_field.h
+++ b/glom/libglom/data_structure/layout/layoutitem_field.h
@@ -153,10 +153,6 @@ public:
*/
bool is_same_field(const sharedptr<const LayoutItem_Field>& field) const;
- /** Returns, for instance, "mytable"."myfield".
- */
- Glib::ustring get_sql_name(const Glib::ustring& parent_table) const;
-
private:
Glib::ustring get_title_no_custom() const;
diff --git a/glom/libglom/utils.cc b/glom/libglom/utils.cc
index 8fb91d6..3b6259f 100644
--- a/glom/libglom/utils.cc
+++ b/glom/libglom/utils.cc
@@ -379,7 +379,7 @@ void Utils::build_sql_select_add_fields_to_get(const Glib::RefPtr<Gnome::Gda::Sq
{
const Gnome::Gda::SqlBuilder::Id id_function = builder->add_function(
fieldsummary->get_summary_type_sql(),
- builder->add_id(layout_item->get_sql_name(table_name)) ); //TODO: Just use add_field_id()?
+ builder->add_field_id(layout_item->get_name(), table_name));
builder->add_field_value_id(id_function);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]