libgda r3194 - in trunk: . doc/C/tmpl tests/data-models



Author: vivien
Date: Fri Aug 29 08:12:04 2008
New Revision: 3194
URL: http://svn.gnome.org/viewvc/libgda?rev=3194&view=rev

Log:
2008-08-29  Vivien Malerba <malerba gnome-db org>

	* doc/C/tmpl/gda-pmodel-user.sgml: adding mising file
	* tests/data-models/Makefile.am:
	* tests/data-models/check_pmodel.c: corrections to have "make distcheck" run


Added:
   trunk/doc/C/tmpl/gda-pmodel-user.sgml
Modified:
   trunk/ChangeLog
   trunk/tests/data-models/Makefile.am
   trunk/tests/data-models/check_pmodel.c

Added: trunk/doc/C/tmpl/gda-pmodel-user.sgml
==============================================================================
--- (empty file)
+++ trunk/doc/C/tmpl/gda-pmodel-user.sgml	Fri Aug 29 08:12:04 2008
@@ -0,0 +1,98 @@
+<!-- ##### SECTION Title ##### -->
+Writable data model from a SELECT statement
+
+<!-- ##### SECTION Short_Description ##### -->
+Alter data in the database by writing to a data model resulting from a SELECT statement's execution.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+  This section deals with how to modify a table's data without directly issuing any INSERT, UPDATE or DELETE statement,
+  but by modifying a data model which has been returned when a SELECT statement has been executed.
+</para>
+
+<para>
+  As all Libgda's database providers should be implemented in the same way, any #GdaDataModel returned by a SELECT statement
+  should inherit the #GdaPModel class which implements all the mechanisms to make it possible that any modification
+  made to it lead to a modification made to a table in the database (using INSERT, UPDATE or DELETE statements).
+</para>
+
+<para>
+  The default behaviour is that #GdaDataModel returned by a SELECT statement be read-only, so if one whishes to write
+  to such a data model, he needs to explicitely enable it and at the same time provide information about how to do it
+  (detailling which table will be modified, which column can be modified, how to identify a unique row, etc).
+  The following functions all allow the programmer to provide this specification information.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### FUNCTION gda_pmodel_set_row_selection_condition_sql ##### -->
+<para>
+
+</para>
+
+ model: 
+ sql_where: 
+ error: 
+ Returns: 
+
+
+<!-- ##### FUNCTION gda_pmodel_set_row_selection_condition ##### -->
+<para>
+
+</para>
+
+ model: 
+ expr: 
+ error: 
+ Returns: 
+
+
+<!-- ##### FUNCTION gda_pmodel_compute_row_selection_condition ##### -->
+<para>
+
+</para>
+
+ model: 
+ error: 
+ Returns: 
+
+
+<!-- ##### FUNCTION gda_pmodel_set_modification_statement ##### -->
+<para>
+
+</para>
+
+ model: 
+ mod_stmt: 
+ error: 
+ Returns: 
+
+
+<!-- ##### FUNCTION gda_pmodel_set_modification_statement_sql ##### -->
+<para>
+
+</para>
+
+ model: 
+ sql: 
+ error: 
+ Returns: 
+
+
+<!-- ##### FUNCTION gda_pmodel_compute_modification_statements ##### -->
+<para>
+
+</para>
+
+ model: 
+ require_pk: 
+ error: 
+ Returns: 
+
+

Modified: trunk/tests/data-models/Makefile.am
==============================================================================
--- trunk/tests/data-models/Makefile.am	(original)
+++ trunk/tests/data-models/Makefile.am	Fri Aug 29 08:12:04 2008
@@ -3,7 +3,9 @@
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
-	-DCHECK_FILES=\""$(top_srcdir)"\"
+	-DCHECK_FILES=\""$(top_srcdir)"\" \
+	-DTOP_SRC_DIR=\""$(top_srcdir)"\" \
+	-DTOP_BUILD_DIR=\""$(top_builddir)"\"
 
 check_PROGRAMS = check_model_import check_virtual check_data_proxy check_model_copy check_pmodel
 TESTS = check_model_import check_virtual check_data_proxy check_model_copy check_pmodel
@@ -46,4 +48,10 @@
 	check_virtual.csv \
 	city.csv \
 	country.csv \
-	data1.xml
+	data1.xml \
+	pmodel_dbstruct.xml \
+	pmodel_data_customers.xml \
+	pmodel_data_locations.xml
+
+CLEANFILES = \
+	pmodel.db

Modified: trunk/tests/data-models/check_pmodel.c
==============================================================================
--- trunk/tests/data-models/check_pmodel.c	(original)
+++ trunk/tests/data-models/check_pmodel.c	Fri Aug 29 08:12:04 2008
@@ -65,6 +65,9 @@
 	gint i, ntests = 0, number_failed = 0;
 	GdaConnection *cnc;
 
+	/* set up test environment */
+        g_setenv ("GDA_TOP_BUILD_DIR", TOP_BUILD_DIR, 0);
+	g_setenv ("GDA_TOP_SRC_DIR", TOP_SRC_DIR, TRUE);
 	gda_init ();
 
 	g_unlink ("pmodel.db");



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