[libgda] GdaBrowser: add information about auto incremented columns



commit 0d2d76a4a08e0acde16b4a6ef7412bff31ee7e9e
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Jul 26 22:17:09 2010 +0200

    GdaBrowser: add information about auto incremented columns

 tools/browser/schema-browser/mgr-columns.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/tools/browser/schema-browser/mgr-columns.c b/tools/browser/schema-browser/mgr-columns.c
index 136932c..3e8941e 100644
--- a/tools/browser/schema-browser/mgr-columns.c
+++ b/tools/browser/schema-browser/mgr-columns.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 The GNOME Foundation.
+ * Copyright (C) 2009 - 2010 The GNOME Foundation.
  *
  * AUTHORS:
  *      Vivien Malerba <malerba gnome-db org>
@@ -380,6 +380,15 @@ mgr_columns_update_children (GdaTreeManager *manager, GdaTreeNode *node, const G
 				details = g_string_new ("");
 			g_string_append (details, _("Foreign key"));
 		}
+		const GValue *autoinc;
+		autoinc = gda_meta_table_column_get_attribute (col, GDA_ATTRIBUTE_AUTO_INCREMENT);
+		if (autoinc) {
+			if (details)
+				g_string_append (details, ", ");
+			else
+				details = g_string_new ("");
+			g_string_append (details, _("Auto incremented"));
+		}
 		if (details) {
 			g_value_set_string ((av = gda_value_new (G_TYPE_STRING)), details->str);
 			gda_tree_node_set_node_attribute (snode, MGR_COLUMNS_COL_DETAILS, av, NULL);



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