[libgda] Added gda_set_new_read_only() required for the BDBSql provider



commit 384fd9da5d8a6b8c22bd3b233850f325a7d552ab
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Sep 13 21:06:57 2010 +0200

    Added gda_set_new_read_only() required for the BDBSql provider

 doc/C/libgda-sections.txt           |    1 +
 doc/C/tmpl/gda-set.sgml             |    9 +++++++++
 libgda/gda-set.c                    |   16 +++++++++++-----
 libgda/gda-set.h                    |    2 +-
 libgda/libgda.symbols               |    1 +
 libgda/sqlite/gda-sqlite-provider.c |    6 +++---
 6 files changed, 26 insertions(+), 9 deletions(-)
---
diff --git a/doc/C/libgda-sections.txt b/doc/C/libgda-sections.txt
index cd313bc..355e9a1 100644
--- a/doc/C/libgda-sections.txt
+++ b/doc/C/libgda-sections.txt
@@ -1035,6 +1035,7 @@ gda_holder_get_type
 <TITLE>GdaSet</TITLE>
 GdaSet
 gda_set_new
+gda_set_new_read_only
 gda_set_copy
 gda_set_new_inline
 gda_set_new_from_spec_string
diff --git a/doc/C/tmpl/gda-set.sgml b/doc/C/tmpl/gda-set.sgml
index b881580..811e423 100644
--- a/doc/C/tmpl/gda-set.sgml
+++ b/doc/C/tmpl/gda-set.sgml
@@ -125,6 +125,15 @@ Container for several values
 @Returns: 
 
 
+<!-- ##### FUNCTION gda_set_new_read_only ##### -->
+<para>
+
+</para>
+
+ holders: 
+ Returns: 
+
+
 <!-- ##### FUNCTION gda_set_copy ##### -->
 <para>
 
diff --git a/libgda/gda-set.c b/libgda/gda-set.c
index b232e6b..9d870f0 100644
--- a/libgda/gda-set.c
+++ b/libgda/gda-set.c
@@ -419,11 +419,19 @@ gda_set_new (GSList *holders)
 	return (GdaSet*) obj;
 }
 
-/*
- * _gda_set_new_read_only
+/**
+ * gda_set_new_read_only:
+ * @holders: (element-type GdaHolder) (transfer:none): a list of #GdaHolder objects
+ *
+ * Creates a new #GdaSet like gda_set_new(), but does not allow modifications to any of the #GdaHolder
+ * object in @holders. This function is used for Libgda's database providers' implementation.
+ *
+ * Returns: a new #GdaSet object
+ *
+ * Since: 4.2
  */
 GdaSet *
-_gda_set_new_read_only (GSList *holders)
+gda_set_new_read_only (GSList *holders)
 {
 	GObject *obj;
 
@@ -436,8 +444,6 @@ _gda_set_new_read_only (GSList *holders)
 	return (GdaSet*) obj;
 }
 
-
-
 /**
  * gda_set_copy:
  * @set: a #GdaSet object
diff --git a/libgda/gda-set.h b/libgda/gda-set.h
index 4fb136b..8ac4599 100644
--- a/libgda/gda-set.h
+++ b/libgda/gda-set.h
@@ -143,7 +143,7 @@ GdaSetGroup  *gda_set_get_group                (GdaSet *set, GdaHolder *holder);
 
 /* private */
 gboolean      _gda_set_validate                (GdaSet *set, GError **error);
-GdaSet *      _gda_set_new_read_only           (GSList *holders);
+GdaSet *      gda_set_new_read_only            (GSList *holders);
 
 
 G_END_DECLS
diff --git a/libgda/libgda.symbols b/libgda/libgda.symbols
index 4ed91b2..357cfcb 100644
--- a/libgda/libgda.symbols
+++ b/libgda/libgda.symbols
@@ -566,6 +566,7 @@
 	gda_set_is_valid
 	gda_set_merge_with_set
 	gda_set_new
+	gda_set_new_read_only
 	gda_set_new_from_spec_node
 	gda_set_new_from_spec_string
 	gda_set_new_inline
diff --git a/libgda/sqlite/gda-sqlite-provider.c b/libgda/sqlite/gda-sqlite-provider.c
index 0ac4642..75df1ff 100644
--- a/libgda/sqlite/gda-sqlite-provider.c
+++ b/libgda/sqlite/gda-sqlite-provider.c
@@ -2124,7 +2124,7 @@ make_last_inserted_set (GdaConnection *cnc, GdaStatement *stmt, sqlite3_int64 la
 
 		if (holders) {
 			holders = g_slist_reverse (holders);
-			set = _gda_set_new_read_only (holders);
+			set = gda_set_new_read_only (holders);
 			g_slist_foreach (holders, (GFunc) g_object_unref, NULL);
 			g_slist_free (holders);
 		}
@@ -2765,12 +2765,12 @@ gda_sqlite_provider_statement_execute (GdaServerProvider *provider, GdaConnectio
 				g_value_set_int ((value = gda_value_new (G_TYPE_INT)), changes);
 				gda_holder_take_value (holder, value, NULL);
 				list = g_slist_append (NULL, holder);
-				set = (GObject*) _gda_set_new_read_only (list);
+				set = (GObject*) gda_set_new_read_only (list);
 				g_slist_free (list);
 				g_object_unref (holder);
 			}
 			else
-				set = (GObject*) _gda_set_new_read_only (NULL);
+				set = (GObject*) gda_set_new_read_only (NULL);
 
 			return set;
 		}



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