libgda r3196 - in trunk: . doc/C doc/C/tmpl libgda libgda/providers-support libgda/sqlite po providers/firebird providers/mysql providers/postgres providers/skel-implementation/capi tests/data-models



Author: vivien
Date: Sat Aug 30 20:55:43 2008
New Revision: 3196
URL: http://svn.gnome.org/viewvc/libgda?rev=3196&view=rev

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

        Renamed GdaPModel to GdaDataSelect (also changed the source files to libgda/) and
        updated the documentation.


Added:
   trunk/doc/C/tmpl/gda-data-select-priv.sgml
   trunk/doc/C/tmpl/gda-data-select.sgml
   trunk/libgda/gda-data-select.c
      - copied, changed from r3194, /trunk/libgda/providers-support/gda-pmodel.c
   trunk/libgda/gda-data-select.h
      - copied, changed from r3194, /trunk/libgda/providers-support/gda-pmodel.h
   trunk/libgda/providers-support/gda-data-select-priv.h
Removed:
   trunk/doc/C/tmpl/gda-pmodel-user.sgml
   trunk/doc/C/tmpl/gda-pmodel.sgml
   trunk/libgda/providers-support/gda-pmodel.c
   trunk/libgda/providers-support/gda-pmodel.h
Modified:
   trunk/ChangeLog
   trunk/doc/C/libgda-4.0-docs.sgml
   trunk/doc/C/libgda-4.0-sections.txt
   trunk/doc/C/libgda-4.0.types.in
   trunk/doc/C/prov-writing.xml
   trunk/doc/C/tmpl/gda-pstmt.sgml
   trunk/libgda/Makefile.am
   trunk/libgda/gda-connection.c
   trunk/libgda/libgda.h.in
   trunk/libgda/providers-support/Makefile.am
   trunk/libgda/sqlite/gda-sqlite-recordset.c
   trunk/libgda/sqlite/gda-sqlite-recordset.h
   trunk/po/POTFILES.in
   trunk/providers/firebird/gda-firebird-recordset.c
   trunk/providers/firebird/gda-firebird-recordset.h
   trunk/providers/mysql/gda-mysql-recordset.c
   trunk/providers/mysql/gda-mysql-recordset.h
   trunk/providers/postgres/gda-postgres-recordset.c
   trunk/providers/postgres/gda-postgres-recordset.h
   trunk/providers/skel-implementation/capi/gda-capi-recordset.c
   trunk/providers/skel-implementation/capi/gda-capi-recordset.h
   trunk/tests/data-models/check_pmodel.c

Modified: trunk/doc/C/libgda-4.0-docs.sgml
==============================================================================
--- trunk/doc/C/libgda-4.0-docs.sgml	(original)
+++ trunk/doc/C/libgda-4.0-docs.sgml	Sat Aug 30 20:55:43 2008
@@ -97,8 +97,8 @@
 <!ENTITY libgda-GdaSqlParser SYSTEM "xml/gda-sql-parser.xml">
 <!ENTITY libgda-GdaMetaStore SYSTEM "xml/gda-meta-store.xml">
 <!ENTITY libgda-GdaMetaStruct SYSTEM "xml/gda-meta-struct.xml">
-<!ENTITY libgda-PModel SYSTEM "xml/gda-pmodel.xml">
-<!ENTITY libgda-PModelUser SYSTEM "xml/gda-pmodel-user.xml">
+<!ENTITY libgda-GdaDataSelect SYSTEM "xml/gda-data-select.xml">
+<!ENTITY libgda-GdaDataSelectPriv SYSTEM "xml/gda-data-select-priv.xml">
 <!ENTITY libgda-PStmt SYSTEM "xml/gda-pstmt.xml">
 <!ENTITY libgda-Enums SYSTEM "xml/gda-enums.xml">
 <!ENTITY libgda-convenient SYSTEM "xml/gda-convenient.xml">
@@ -505,7 +505,7 @@
       &libgda-GdaSqlParser;
       &libgda-GdaStatement;
       &libgda-GdaBatch;
-      &libgda-PModelUser;
+      &libgda-GdaDataSelect;
       &libgda-GdaHolder;
       &libgda-GdaSet;
       &libgda-GdaSqlStatement;
@@ -1279,7 +1279,7 @@
     <chapter id="psupport">
       <title>Providers' support API</title>
       &libgda-GdaServerProvider;
-      &libgda-PModel;
+      &libgda-GdaDataSelectPriv;
       &libgda-PStmt;
       &provider-support;
     </chapter>

Modified: trunk/doc/C/libgda-4.0-sections.txt
==============================================================================
--- trunk/doc/C/libgda-4.0-sections.txt	(original)
+++ trunk/doc/C/libgda-4.0-sections.txt	Sat Aug 30 20:55:43 2008
@@ -1372,32 +1372,31 @@
 </SECTION>
 
 <SECTION>
-<FILE>gda-pmodel</FILE>
-<TITLE>GdaPModel</TITLE>
-<INCLUDE>providers-support/gda-pmodel.h</INCLUDE>
-GdaPModel
-GdaPModelClass
-gda_pmodel_take_row
-gda_pmodel_get_stored_row
-gda_pmodel_get_connection
+<FILE>gda-data-select</FILE>
+<TITLE>GdaDataSelect</TITLE>
+GdaDataSelect
+gda_data_select_set_row_selection_condition_sql
+gda_data_select_set_row_selection_condition
+gda_data_select_compute_row_selection_condition
+gda_data_select_set_modification_statement
+gda_data_select_set_modification_statement_sql
+gda_data_select_compute_modification_statements
 <SUBSECTION Standard>
-GDA_IS_PMODEL
-GDA_PMODEL
-GDA_PMODEL_CLASS
-GDA_TYPE_PMODEL
-gda_pmodel_get_type
+GDA_IS_DATA_SELECT
+GDA_DATA_SELECT
+GDA_DATA_SELECT_CLASS
+GDA_TYPE_DATA_SELECT
+gda_data_select_get_type
 </SECTION>
 
 <SECTION>
-<FILE>gda-pmodel-user</FILE>
-<TITLE>Modifying the result of a SELECT statement</TITLE>
-<INCLUDE>providers-support/gda-pmodel.h</INCLUDE>
-gda_pmodel_set_row_selection_condition_sql
-gda_pmodel_set_row_selection_condition
-gda_pmodel_compute_row_selection_condition
-gda_pmodel_set_modification_statement
-gda_pmodel_set_modification_statement_sql
-gda_pmodel_compute_modification_statements
+<FILE>gda-data-select-priv</FILE>
+<TITLE>Subclassing GdaDataSelect</TITLE>
+<INCLUDE>providers-support/gda-data-select-priv.h</INCLUDE>
+GdaDataSelectClass
+gda_data_select_take_row
+gda_data_select_get_stored_row
+gda_data_select_get_connection
 </SECTION>
 
 <SECTION>

Modified: trunk/doc/C/libgda-4.0.types.in
==============================================================================
--- trunk/doc/C/libgda-4.0.types.in	(original)
+++ trunk/doc/C/libgda-4.0.types.in	Sat Aug 30 20:55:43 2008
@@ -56,3 +56,4 @@
 gda_set_get_type
 gda_meta_store_get_type
 gda_meta_struct_get_type
+gda_data_select_get_type

Modified: trunk/doc/C/prov-writing.xml
==============================================================================
--- trunk/doc/C/prov-writing.xml	(original)
+++ trunk/doc/C/prov-writing.xml	Sat Aug 30 20:55:43 2008
@@ -504,7 +504,7 @@
 <chapter id="libgda-provider-recordset">
   <title>Virtual methods for recordsets</title>
   <para>
-    This section explains how to write virtual methods for the <link linkend="GdaPModel">GdaPModel</link> subclasses
+    This section explains how to write virtual methods for the <link linkend="GdaDataSelect">GdaDataSelect</link> subclasses
     implementations, which should be done when implementing a database provider.
   </para>
   <para>
@@ -518,7 +518,7 @@
     <itemizedlist>
       <listitem>
 	<para>can rely on the <link linkend="GdaRow">GdaRow</link> implementation to keep them, using
-	  the <link linkend="gda-pmodel-take-row">gda_pmodel_take_row ()</link> method for each row object created which
+	  the <link linkend="gda-data-select-take-row">gda_data_select_take_row ()</link> method for each row object created which
 	  is the easiest, the fastest as once created, the rows are available for further usage, 
 	  but will consume more memory with each row read from the model.</para>
       </listitem>
@@ -542,7 +542,7 @@
     <para>
       Note that the number of rows of the data model may not be known until the cursor has reached the
       Once known, the number of rows can be stored in the <structfield>advertized_nrows</structfield>'s member of the
-      <link linkend="GdaPModel">GdaPModel</link> object.
+      <link linkend="GdaDataSelect">GdaDataSelect</link> object.
     </para>
   </sect2>
 
@@ -649,7 +649,7 @@
 	  inheriting the <link linkend="GdaServerProvider">GdaServerProvider</link> object. This object must implement its
 	  <link linkend="libgda-provider-class">virtual methods</link>.</para></listitem>
       <listitem><para><filename>gda-capi-recordset.[ch]</filename>: are the header and implementation files for the object
-	  inheriting the <link linkend="GdaPModel">GdaPModel</link> object. This object must implement its
+	  inheriting the <link linkend="GdaDataSelect">GdaDataSelect</link> object. This object must implement its
 	  <link linkend="libgda-provider-recordset">virtual methods</link>.</para></listitem>
       <listitem><para><filename>gda-capi-ddl.[ch]</filename>: are the files implementing the DDL queries</para></listitem>
       <listitem><para><filename>gda-capi-parser.[ch]</filename>: are the header and implementation files 

Added: trunk/doc/C/tmpl/gda-data-select-priv.sgml
==============================================================================
--- (empty file)
+++ trunk/doc/C/tmpl/gda-data-select-priv.sgml	Sat Aug 30 20:55:43 2008
@@ -0,0 +1,75 @@
+<!-- ##### SECTION Title ##### -->
+Subclassing GdaDataSelect
+
+<!-- ##### SECTION Short_Description ##### -->
+Base class for all the data models returned by DBMS providers when a SELECT statement is executed
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+  All database providers should subclass this class when returning a data model after the execution of a SELECT
+  statement. Specifically it has the following features:
+  <itemizedlist>
+    <listitem><para>Manages its list of <link linkend="GdaColumn">GdaColumn</link> using the list exported by the prepared statement object (<link linkend="GdaPStmt">GdaPStmt</link>)</para></listitem>
+    <listitem><para>Allows random or cursor based access</para></listitem>
+    <listitem><para>Allows for efficient memory usage allowing the subclass to finely tune its memory usage</para></listitem>
+    <listitem><para>Provides a generic mechanism for writable data models</para></listitem>
+  </itemizedlist>
+</para>
+<para>
+  See the <link linkend="libgda-provider-recordset">Virtual methods for recordsets</link> section for more information
+  about how to implement the virtual methods of the subclassed object.
+</para>
+<para>
+  This section documents the methods available for the database provider's implementations.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GdaDataSelectClass ##### -->
+<para>
+
+</para>
+
+ parent_class: parent object class
+ fetch_nb_rows: virtual method which must be implemented when access method is GDA_DATA_MODEL_ACCESS_RANDOM
+ fetch_random: virtual method which must be implemented when access method is GDA_DATA_MODEL_ACCESS_RANDOM
+ store_all: 
+ fetch_next: virtual method which must be implemented when access method is GDA_DATA_MODEL_ACCESS_CURSOR_FORWARD
+ fetch_prev: virtual method which must be implemented when access method is GDA_DATA_MODEL_ACCESS_CURSOR_BACKWARD
+ fetch_at: virtual method which can be implemented when access method is GDA_DATA_MODEL_ACCESS_CURSOR_FORWARD or GDA_DATA_MODEL_ACCESS_CURSOR_BACKWARD
+
+<!-- ##### FUNCTION gda_data_select_take_row ##### -->
+<para>
+
+</para>
+
+ model: 
+ row: 
+ rownum: 
+
+
+<!-- ##### FUNCTION gda_data_select_get_stored_row ##### -->
+<para>
+
+</para>
+
+ model: 
+ rownum: 
+ Returns: 
+
+
+<!-- ##### FUNCTION gda_data_select_get_connection ##### -->
+<para>
+
+</para>
+
+ model: 
+ Returns: 
+
+

Added: trunk/doc/C/tmpl/gda-data-select.sgml
==============================================================================
--- (empty file)
+++ trunk/doc/C/tmpl/gda-data-select.sgml	Sat Aug 30 20:55:43 2008
@@ -0,0 +1,139 @@
+<!-- ##### SECTION Title ##### -->
+GdaDataSelect
+
+<!-- ##### SECTION Short_Description ##### -->
+Data models returned by the execution of a SELECT statement
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+  This data model implements the <link linkend="GdaDataModel">GdaDataModel</link> interface and is the required
+  base object when database providers implement a data model returned when a SELECT statement has been executed.
+  As the <link linkend="GdaDataModel">GdaDataModel</link> interface is implemented, consult the API
+  to access and modify the data held in a <link linkend="GdaDataSelect">GdaDataSelect</link> object.
+</para>
+<para>
+  The default behaviour however is to disallow modifications, and this section documents how to characterize
+  a <link linkend="GdaDataSelect">GdaDataSelect</link> to allow modifications. Once this is done, any modification
+  done to the data model whill be propagated to the modified table in the database using INSERT, UPDATE or DELETE
+  statements, while the data in the data model will always be kept up to date with the modifications done.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GdaDataSelect ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG GdaDataSelect:connection ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdaDataSelect:delete-query ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdaDataSelect:exec-params ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdaDataSelect:insert-query ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdaDataSelect:model-usage ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdaDataSelect:prepared-stmt ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdaDataSelect:store-all-rows ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdaDataSelect:update-query ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gda_data_select_set_row_selection_condition_sql ##### -->
+<para>
+
+</para>
+
+ model: 
+ sql_where: 
+ error: 
+ Returns: 
+
+
+<!-- ##### FUNCTION gda_data_select_set_row_selection_condition ##### -->
+<para>
+
+</para>
+
+ model: 
+ expr: 
+ error: 
+ Returns: 
+
+
+<!-- ##### FUNCTION gda_data_select_compute_row_selection_condition ##### -->
+<para>
+
+</para>
+
+ model: 
+ error: 
+ Returns: 
+
+
+<!-- ##### FUNCTION gda_data_select_set_modification_statement ##### -->
+<para>
+
+</para>
+
+ model: 
+ mod_stmt: 
+ error: 
+ Returns: 
+
+
+<!-- ##### FUNCTION gda_data_select_set_modification_statement_sql ##### -->
+<para>
+
+</para>
+
+ model: 
+ sql: 
+ error: 
+ Returns: 
+
+
+<!-- ##### FUNCTION gda_data_select_compute_modification_statements ##### -->
+<para>
+
+</para>
+
+ model: 
+ require_pk: 
+ error: 
+ Returns: 
+
+

Modified: trunk/doc/C/tmpl/gda-pstmt.sgml
==============================================================================
--- trunk/doc/C/tmpl/gda-pstmt.sgml	(original)
+++ trunk/doc/C/tmpl/gda-pstmt.sgml	Sat Aug 30 20:55:43 2008
@@ -38,13 +38,6 @@
 
 </para>
 
- object: base object
- priv: 
- sql: actual SQL code used for this prepared statement, its memory is freed by the object itself
- param_ids: list of parameters' IDs (as gchar *), the memory is freed by object itself
- ncols: number of columns in the returned data model (if the prepared statement is a SELECT statement)
- types: array of ncols types (if the prepared statement is a SELECT statement)
- tmpl_columns: list of <link linkend="GdaColumn">GdaColumn</link> objects which data models created from this prepared statement can copy
 
 <!-- ##### FUNCTION gda_pstmt_set_gda_statement ##### -->
 <para>

Modified: trunk/libgda/Makefile.am
==============================================================================
--- trunk/libgda/Makefile.am	(original)
+++ trunk/libgda/Makefile.am	Sat Aug 30 20:55:43 2008
@@ -45,6 +45,7 @@
 	gda-data-model-query.h \
 	gda-data-access-wrapper.h \
 	gda-data-proxy.h \
+	gda-data-select.h \
 	gda-debug-macros.h \
 	gda-decl.h \
 	gda-easy.h \
@@ -98,6 +99,7 @@
 	gda-data-model-query.c \
 	gda-data-access-wrapper.c \
 	gda-data-proxy.c \
+	gda-data-select.c \
 	gda-easy.c \
 	gda-holder.c \
 	gda-init.c \

Modified: trunk/libgda/gda-connection.c
==============================================================================
--- trunk/libgda/gda-connection.c	(original)
+++ trunk/libgda/gda-connection.c	Sat Aug 30 20:55:43 2008
@@ -1504,10 +1504,10 @@
  * As @stmt can, by desing (and if not abused), contain only one SQL statement, the
  * return object will either be:
  * <itemizedlist>
- *   <listitem><para>a #GdaDataModel if @stmt is a SELECT statement (a GDA_SQL_STATEMENT_SELECT, see #GdaSqlStatementType)
+ *   <listitem><para>a #GdaDataSelect object (which is also a #GdaDataModel) if @stmt is a SELECT statement 
+ *             (usually a GDA_SQL_STATEMENT_SELECT, see #GdaSqlStatementType)
  *             containing the results of the SELECT. The resulting data model is by default read only, but
- *             modifications can be enabled, see the section about
- *             <link linkend="libgda-40-Modifying-the-result-of-a-SELECT-statement">modifying the result of a SELECT statement</link>.</para></listitem> for more information.
+ *             modifications can be enabled, see the #GdaDataSelect's documentation for more information.</para></listitem>
  *   <listitem><para>a #GdaSet for any other SQL statement which correctly executed. In this case
  *        (if the provider supports it), then the #GdaSet may contain value holders named:
  *        <itemizedlist>

Copied: trunk/libgda/gda-data-select.c (from r3194, /trunk/libgda/providers-support/gda-pmodel.c)
==============================================================================
--- /trunk/libgda/providers-support/gda-pmodel.c	(original)
+++ trunk/libgda/gda-data-select.c	Sat Aug 30 20:55:43 2008
@@ -25,16 +25,17 @@
 #include <libgda/gda-data-model-iter.h>
 #include <libgda/gda-data-model-private.h>
 #include <string.h>
-#include "gda-pmodel.h"
+#include "gda-data-select.h"
+#include "providers-support/gda-data-select-priv.h"
 #include "gda-row.h"
-#include "gda-pstmt.h"
+#include "providers-support/gda-pstmt.h"
 #include <libgda/gda-statement.h>
 #include <libgda/gda-holder.h>
 #include <libgda/gda-connection.h>
 #include <libgda/gda-util.h>
 #include <sql-parser/gda-sql-parser.h>
 
-#define CLASS(x) (GDA_PMODEL_CLASS (G_OBJECT_GET_CLASS (x)))
+#define CLASS(x) (GDA_DATA_SELECT_CLASS (G_OBJECT_GET_CLASS (x)))
 
 typedef enum
 {
@@ -62,13 +63,13 @@
  *    the associated DelayedSelectStmt to retreive the GdaRow
  *  - use the virtual methods to actually retreive the requested GdaRow
  */
-static gint external_to_internal_row (GdaPModel *model, gint ext_row, GError **error);
+static gint external_to_internal_row (GdaDataSelect *model, gint ext_row, GError **error);
 
 /*
  * Getting a GdaRow from a model row:
  * [model row] ==(model->index)==> [index in model->rows] ==(model->rows)==> [GdaRow pointer]
  */
-struct _GdaPModelPrivate {
+struct _GdaDataSelectPrivate {
 	GdaConnection          *cnc;
 	GSList                 *columns; /* list of GdaColumn objects */
 	GArray                 *rows; /* Array of GdaRow pointers */
@@ -113,24 +114,24 @@
 };
 
 /* module error */
-GQuark gda_pmodel_error_quark (void)
+GQuark gda_data_select_error_quark (void)
 {
         static GQuark quark;
         if (!quark)
-                quark = g_quark_from_static_string ("gda_pmodel_error");
+                quark = g_quark_from_static_string ("gda_data_select_error");
         return quark;
 }
 
-static void gda_pmodel_class_init (GdaPModelClass *klass);
-static void gda_pmodel_init       (GdaPModel *model, GdaPModelClass *klass);
-static void gda_pmodel_dispose    (GObject *object);
-static void gda_pmodel_finalize   (GObject *object);
+static void gda_data_select_class_init (GdaDataSelectClass *klass);
+static void gda_data_select_init       (GdaDataSelect *model, GdaDataSelectClass *klass);
+static void gda_data_select_dispose    (GObject *object);
+static void gda_data_select_finalize   (GObject *object);
 
-static void gda_pmodel_set_property (GObject *object,
+static void gda_data_select_set_property (GObject *object,
 				     guint param_id,
 				     const GValue *value,
 				     GParamSpec *pspec);
-static void gda_pmodel_get_property (GObject *object,
+static void gda_data_select_get_property (GObject *object,
 				     guint param_id,
 				     GValue *value,
 				     GParamSpec *pspec);
@@ -140,69 +141,69 @@
 	gint    size; /* number of elements in the @data array */
 	guchar *data; /* data[0] tp data[ size-1] are valid */
 } BVector;
-static GdaStatement *check_acceptable_statement (GdaPModel *model, GError **error);
-static GdaStatement *compute_single_update_stmt (GdaPModel *model, BVector *bv, GError **error);
-static GdaStatement *compute_single_insert_stmt (GdaPModel *model, BVector *bv, GError **error);
-static GdaStatement *compute_single_select_stmt (GdaPModel *model, GError **error);
+static GdaStatement *check_acceptable_statement (GdaDataSelect *model, GError **error);
+static GdaStatement *compute_single_update_stmt (GdaDataSelect *model, BVector *bv, GError **error);
+static GdaStatement *compute_single_insert_stmt (GdaDataSelect *model, BVector *bv, GError **error);
+static GdaStatement *compute_single_select_stmt (GdaDataSelect *model, GError **error);
 static gint *compute_insert_select_params_mapping (GdaSet *sel_params, GdaSet *ins_values, GdaSqlExpr *row_cond);
 
 
 /* GdaDataModel interface */
-static void                 gda_pmodel_data_model_init (GdaDataModelClass *iface);
-static gint                 gda_pmodel_get_n_rows      (GdaDataModel *model);
-static gint                 gda_pmodel_get_n_columns   (GdaDataModel *model);
-static GdaColumn           *gda_pmodel_describe_column (GdaDataModel *model, gint col);
-static GdaDataModelAccessFlags gda_pmodel_get_access_flags(GdaDataModel *model);
-static const GValue        *gda_pmodel_get_value_at    (GdaDataModel *model, gint col, gint row);
-static GdaValueAttribute    gda_pmodel_get_attributes_at (GdaDataModel *model, gint col, gint row);
-
-static GdaDataModelIter    *gda_pmodel_create_iter     (GdaDataModel *model);
-static gboolean             gda_pmodel_iter_next       (GdaDataModel *model, GdaDataModelIter *iter);
-static gboolean             gda_pmodel_iter_prev       (GdaDataModel *model, GdaDataModelIter *iter);
-static gboolean             gda_pmodel_iter_at_row     (GdaDataModel *model, GdaDataModelIter *iter, gint row);
+static void                 gda_data_select_data_model_init (GdaDataModelClass *iface);
+static gint                 gda_data_select_get_n_rows      (GdaDataModel *model);
+static gint                 gda_data_select_get_n_columns   (GdaDataModel *model);
+static GdaColumn           *gda_data_select_describe_column (GdaDataModel *model, gint col);
+static GdaDataModelAccessFlags gda_data_select_get_access_flags(GdaDataModel *model);
+static const GValue        *gda_data_select_get_value_at    (GdaDataModel *model, gint col, gint row);
+static GdaValueAttribute    gda_data_select_get_attributes_at (GdaDataModel *model, gint col, gint row);
+
+static GdaDataModelIter    *gda_data_select_create_iter     (GdaDataModel *model);
+static gboolean             gda_data_select_iter_next       (GdaDataModel *model, GdaDataModelIter *iter);
+static gboolean             gda_data_select_iter_prev       (GdaDataModel *model, GdaDataModelIter *iter);
+static gboolean             gda_data_select_iter_at_row     (GdaDataModel *model, GdaDataModelIter *iter, gint row);
 
-static gboolean             gda_pmodel_set_value_at    (GdaDataModel *model, gint col, gint row, 
+static gboolean             gda_data_select_set_value_at    (GdaDataModel *model, gint col, gint row, 
 							const GValue *value, GError **error);
-static gboolean             gda_pmodel_set_values      (GdaDataModel *model, gint row, GList *values,
+static gboolean             gda_data_select_set_values      (GdaDataModel *model, gint row, GList *values,
 							GError **error);
-static gint                 gda_pmodel_append_values   (GdaDataModel *model, const GList *values, GError **error);
-static gboolean             gda_pmodel_remove_row      (GdaDataModel *model, gint row, GError **error);
+static gint                 gda_data_select_append_values   (GdaDataModel *model, const GList *values, GError **error);
+static gboolean             gda_data_select_remove_row      (GdaDataModel *model, gint row, GError **error);
 
 static GObjectClass *parent_class = NULL;
 
 /**
- * gda_pmodel_get_type
+ * gda_data_select_get_type
  *
- * Returns: the #GType of GdaPModel.
+ * Returns: the #GType of GdaDataSelect.
  */
 GType
-gda_pmodel_get_type (void)
+gda_data_select_get_type (void)
 {
 	static GType type = 0;
 
 	if (G_UNLIKELY (type == 0)) {
 		static GStaticMutex registering = G_STATIC_MUTEX_INIT;
 		static const GTypeInfo info = {
-			sizeof (GdaPModelClass),
+			sizeof (GdaDataSelectClass),
 			(GBaseInitFunc) NULL,
 			(GBaseFinalizeFunc) NULL,
-			(GClassInitFunc) gda_pmodel_class_init,
+			(GClassInitFunc) gda_data_select_class_init,
 			NULL,
 			NULL,
-			sizeof (GdaPModel),
+			sizeof (GdaDataSelect),
 			0,
-			(GInstanceInitFunc) gda_pmodel_init
+			(GInstanceInitFunc) gda_data_select_init
 		};
 
 		static const GInterfaceInfo data_model_info = {
-			(GInterfaceInitFunc) gda_pmodel_data_model_init,
+			(GInterfaceInitFunc) gda_data_select_data_model_init,
 			NULL,
 			NULL
 		};
 
 		g_static_mutex_lock (&registering);
 		if (type == 0) {
-			type = g_type_register_static (G_TYPE_OBJECT, "GdaPModel", &info, G_TYPE_FLAG_ABSTRACT);
+			type = g_type_register_static (G_TYPE_OBJECT, "GdaDataSelect", &info, G_TYPE_FLAG_ABSTRACT);
 			g_type_add_interface_static (type, GDA_TYPE_DATA_MODEL, &data_model_info);
 		}
 		g_static_mutex_unlock (&registering);
@@ -211,15 +212,15 @@
 }
 
 static void 
-gda_pmodel_class_init (GdaPModelClass *klass)
+gda_data_select_class_init (GdaDataSelectClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
 	parent_class = g_type_class_peek_parent (klass);
 
 	/* properties */
-	object_class->set_property = gda_pmodel_set_property;
-        object_class->get_property = gda_pmodel_get_property;
+	object_class->set_property = gda_data_select_set_property;
+        object_class->get_property = gda_data_select_get_property;
 	g_object_class_install_property (object_class, PROP_CNC,
                                          g_param_spec_object ("connection", 
 							      "Connection from which this data model is created", 
@@ -261,30 +262,30 @@
 							      G_PARAM_READABLE | G_PARAM_WRITABLE));
 
 	/* virtual functions */
-	object_class->dispose = gda_pmodel_dispose;
-	object_class->finalize = gda_pmodel_finalize;
+	object_class->dispose = gda_data_select_dispose;
+	object_class->finalize = gda_data_select_finalize;
 }
 
 static void
-gda_pmodel_data_model_init (GdaDataModelClass *iface)
+gda_data_select_data_model_init (GdaDataModelClass *iface)
 {
-	iface->i_get_n_rows = gda_pmodel_get_n_rows;
-	iface->i_get_n_columns = gda_pmodel_get_n_columns;
-	iface->i_describe_column = gda_pmodel_describe_column;
-        iface->i_get_access_flags = gda_pmodel_get_access_flags;
-	iface->i_get_value_at = gda_pmodel_get_value_at;
-	iface->i_get_attributes_at = gda_pmodel_get_attributes_at;
-
-	iface->i_create_iter = gda_pmodel_create_iter;
-        iface->i_iter_at_row = gda_pmodel_iter_at_row;
-        iface->i_iter_next = gda_pmodel_iter_next;
-        iface->i_iter_prev = gda_pmodel_iter_prev;
-
-	iface->i_set_value_at = gda_pmodel_set_value_at;
-	iface->i_set_values = gda_pmodel_set_values;
-        iface->i_append_values = gda_pmodel_append_values;
+	iface->i_get_n_rows = gda_data_select_get_n_rows;
+	iface->i_get_n_columns = gda_data_select_get_n_columns;
+	iface->i_describe_column = gda_data_select_describe_column;
+        iface->i_get_access_flags = gda_data_select_get_access_flags;
+	iface->i_get_value_at = gda_data_select_get_value_at;
+	iface->i_get_attributes_at = gda_data_select_get_attributes_at;
+
+	iface->i_create_iter = gda_data_select_create_iter;
+        iface->i_iter_at_row = gda_data_select_iter_at_row;
+        iface->i_iter_next = gda_data_select_iter_next;
+        iface->i_iter_prev = gda_data_select_iter_prev;
+
+	iface->i_set_value_at = gda_data_select_set_value_at;
+	iface->i_set_values = gda_data_select_set_values;
+        iface->i_append_values = gda_data_select_append_values;
 	iface->i_append_row = NULL;
-	iface->i_remove_row = gda_pmodel_remove_row;
+	iface->i_remove_row = gda_data_select_remove_row;
 	iface->i_find_row = NULL;
 	
 	iface->i_set_notify = NULL;
@@ -293,10 +294,10 @@
 }
 
 static void
-gda_pmodel_init (GdaPModel *model, GdaPModelClass *klass)
+gda_data_select_init (GdaDataSelect *model, GdaDataSelectClass *klass)
 {
-	g_return_if_fail (GDA_IS_PMODEL (model));
-	model->priv = g_new0 (GdaPModelPrivate, 1);
+	g_return_if_fail (GDA_IS_DATA_SELECT (model));
+	model->priv = g_new0 (GdaDataSelectPrivate, 1);
 	model->priv->cnc = NULL;
 	model->priv->rows = g_array_new (FALSE, FALSE, sizeof (GdaRow *));
 	model->priv->index = g_hash_table_new (g_direct_hash, g_direct_equal);
@@ -320,11 +321,11 @@
 }
 
 static void
-gda_pmodel_dispose (GObject *object)
+gda_data_select_dispose (GObject *object)
 {
-	GdaPModel *model = (GdaPModel *) object;
+	GdaDataSelect *model = (GdaDataSelect *) object;
 
-	g_return_if_fail (GDA_IS_PMODEL (model));
+	g_return_if_fail (GDA_IS_DATA_SELECT (model));
 
 	/* free memory */
 	if (model->priv) {
@@ -414,11 +415,11 @@
 }
 
 static void
-gda_pmodel_finalize (GObject *object)
+gda_data_select_finalize (GObject *object)
 {
-	GdaPModel *model = (GdaPModel *) object;
+	GdaDataSelect *model = (GdaDataSelect *) object;
 
-	g_return_if_fail (GDA_IS_PMODEL (model));
+	g_return_if_fail (GDA_IS_DATA_SELECT (model));
 
 	/* free memory */
 	if (model->priv) {
@@ -431,7 +432,7 @@
 }
 
 static void
-create_columns (GdaPModel *model) 
+create_columns (GdaDataSelect *model) 
 {
 	gint i;
 	if (model->priv->columns) {
@@ -444,7 +445,7 @@
 
 	if (model->prep_stmt->ncols < 0)
 		g_error ("INTERNAL implementation error: unknown number of columns in GdaPStmt, \n"
-			 "set number of columns before using with GdaPModel");
+			 "set number of columns before using with GdaDataSelect");
 	if (model->prep_stmt->tmpl_columns) {
 		/* copy template columns */
 		GSList *list;
@@ -464,12 +465,12 @@
 }
 
 static void
-gda_pmodel_set_property (GObject *object,
+gda_data_select_set_property (GObject *object,
 			 guint param_id,
 			 const GValue *value,
 			 GParamSpec *pspec)
 {
-	GdaPModel *model = (GdaPModel *) object;
+	GdaDataSelect *model = (GdaDataSelect *) object;
 	if (model->priv) {
 		switch (param_id) {
 		case PROP_CNC:
@@ -539,12 +540,12 @@
 }
 
 static void
-gda_pmodel_get_property (GObject *object,
+gda_data_select_get_property (GObject *object,
 			 guint param_id,
 			 GValue *value,
 			 GParamSpec *pspec)
 {
-	GdaPModel *model = (GdaPModel *) object;
+	GdaDataSelect *model = (GdaDataSelect *) object;
 	if (model->priv) {
 		switch (param_id) {
 		case PROP_CNC:
@@ -584,8 +585,8 @@
 }
 
 /**
- * gda_pmodel_take_row
- * @model: a #GdaPModel data model
+ * gda_data_select_take_row
+ * @model: a #GdaDataSelect data model
  * @row: a #GdaRow row
  * @rownum: "external" advertized row number
  *
@@ -593,9 +594,9 @@
  * The reference to @row is stolen.
  */
 void
-gda_pmodel_take_row (GdaPModel *model, GdaRow *row, gint rownum)
+gda_data_select_take_row (GdaDataSelect *model, GdaRow *row, gint rownum)
 {
-	g_return_if_fail (GDA_IS_PMODEL (model));
+	g_return_if_fail (GDA_IS_DATA_SELECT (model));
 	g_return_if_fail (GDA_IS_ROW (row));
 
 	if (g_hash_table_lookup (model->priv->index, GINT_TO_POINTER (rownum + 1))) 
@@ -607,8 +608,8 @@
 }
 
 /**
- * gda_pmodel_get_stored_row
- * @model: a #GdaPModel data model
+ * gda_data_select_get_stored_row
+ * @model: a #GdaDataSelect data model
  * @rownum: "external" advertized row number
  *
  * Get the #GdaRow object stored within @model at row @rownum (without taking care of removed rows)
@@ -616,10 +617,10 @@
  * Returns: the requested #GdaRow, or %NULL if not found
  */
 GdaRow *
-gda_pmodel_get_stored_row (GdaPModel *model, gint rownum)
+gda_data_select_get_stored_row (GdaDataSelect *model, gint rownum)
 {
 	gint irow;
-	g_return_val_if_fail (GDA_IS_PMODEL (model), NULL);
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), NULL);
 	g_return_val_if_fail (model->priv, NULL);
 
 	irow = GPOINTER_TO_INT (g_hash_table_lookup (model->priv->index, GINT_TO_POINTER (rownum + 1)));
@@ -630,8 +631,8 @@
 }
 
 /**
- * gda_pmodel_get_connection
- * @model: a #GdaPModel data model
+ * gda_data_select_get_connection
+ * @model: a #GdaDataSelect data model
  *
  * Get a pointer to the #GdaConnection object which was used when @model was created
  * (and which may be used internally by @model).
@@ -639,9 +640,9 @@
  * Returns: a pointer to the #GdaConnection, or %NULL
  */
 GdaConnection *
-gda_pmodel_get_connection (GdaPModel *model)
+gda_data_select_get_connection (GdaDataSelect *model)
 {
-	g_return_val_if_fail (GDA_IS_PMODEL (model), NULL);
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), NULL);
 	g_return_val_if_fail (model->priv, NULL);
 
 	return model->priv->cnc;
@@ -651,7 +652,7 @@
  * Add the +/-<col num> holders to model->priv->modif_set
  */
 static gboolean
-compute_modif_set (GdaPModel *model, GError **error)
+compute_modif_set (GdaDataSelect *model, GError **error)
 {
 	gint i;
 	
@@ -719,24 +720,24 @@
 }
 
 /**
- * gda_pmodel_set_modification_statement_sql
- * @model: a #GdaPModel data model
+ * gda_data_select_set_modification_statement_sql
+ * @model: a #GdaDataSelect data model
  * @sql: an SQL text
  * @error: a place to store errors, or %NULL
  *
- * Offers the same feature as gda_pmodel_set_modification_statement() but using an SQL statement
+ * Offers the same feature as gda_data_select_set_modification_statement() but using an SQL statement
  *
  * Returns: TRUE if no error occurred.
  */
 gboolean
-gda_pmodel_set_modification_statement_sql (GdaPModel *model, const gchar *sql, GError **error)
+gda_data_select_set_modification_statement_sql (GdaDataSelect *model, const gchar *sql, GError **error)
 {
 	GdaSqlParser *parser;
 	GdaStatement *stmt;
 	const gchar *remain = NULL;
 	gboolean retval;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), FALSE);
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), FALSE);
 	g_return_val_if_fail (model->priv, FALSE);
 
 	/* check the original SELECT statement which was executed is not a compound statement */
@@ -753,12 +754,12 @@
 		return FALSE;
 	if (remain) {
 		g_object_unref (stmt);
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_SQL_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_SQL_ERROR,
 			     _("Incorrect SQL expression"));
 		return FALSE;
 	}
 	
-	retval = gda_pmodel_set_modification_statement (model, stmt, error);
+	retval = gda_data_select_set_modification_statement (model, stmt, error);
 	g_object_unref (stmt);
 
 	return retval;
@@ -770,24 +771,24 @@
  * Returns: the SELECT #GdaStatement, or %NULL if an error occurred.
  */
 static GdaStatement *
-check_acceptable_statement (GdaPModel *model, GError **error)
+check_acceptable_statement (GdaDataSelect *model, GError **error)
 {
 	GdaStatement *sel_stmt;
 	if (! model->prep_stmt) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Internal error: the \"prepared-stmt\" property has not been set"));
 		return NULL;
 	}
 
 	sel_stmt = gda_pstmt_get_gda_statement (model->prep_stmt);
 	if (! sel_stmt) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Internal error: can't get the prepared statement's actual statement"));
 		return NULL;
 	}
 
 	if (gda_statement_get_statement_type (sel_stmt) != GDA_SQL_STATEMENT_SELECT) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Unsupported type of SELECT statement"));
 		return NULL;
 	}
@@ -796,8 +797,8 @@
 }
 
 /**
- * gda_pmodel_set_modification_statement
- * @model: a #GdaPModel data model
+ * gda_data_select_set_modification_statement
+ * @model: a #GdaDataSelect data model
  * @mod_stmt: a #GdaStatement (INSERT, UPDATE or DELETE)
  * @error: a place to store errors, or %NULL
  *
@@ -818,23 +819,23 @@
  * a unique row in @model (please note that this property can't be checked but may result
  * in @model behaving in an unpredictable way).
  *
- * NOTE1: However, if the gda_pmodel_set_row_selection_condition()
- * or gda_pmodel_set_row_selection_condition_sql() have been successfully be called before, the WHERE
+ * NOTE1: However, if the gda_data_select_set_row_selection_condition()
+ * or gda_data_select_set_row_selection_condition_sql() have been successfully be called before, the WHERE
  * part of @mod_stmt <emphasis>WILL</emphasis> be modified to use the row selection condition specified through one of
  * these methods (please not that it is then possible to avoid specifying a WHERE part in @mod_stmt then).
  *
- * NOTE2: if gda_pmodel_set_row_selection_condition()
- * or gda_pmodel_set_row_selection_condition_sql() have not yet been successfully be called before, then
+ * NOTE2: if gda_data_select_set_row_selection_condition()
+ * or gda_data_select_set_row_selection_condition_sql() have not yet been successfully be called before, then
  * the WHERE part of @mod_stmt will be used as if one of these functions had been called.
  *
  * Returns: TRUE if no error occurred.
  */
 gboolean
-gda_pmodel_set_modification_statement (GdaPModel *model, GdaStatement *mod_stmt, GError **error)
+gda_data_select_set_modification_statement (GdaDataSelect *model, GdaStatement *mod_stmt, GError **error)
 {
 	ModType mtype = NB_QUERIES;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), FALSE);
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), FALSE);
 	g_return_val_if_fail (model->priv, FALSE);
 	g_return_val_if_fail (GDA_IS_STATEMENT (mod_stmt), FALSE);
 
@@ -855,13 +856,13 @@
 		g_assert (sqlst);
 		ins = (GdaSqlStatementInsert*) sqlst->contents;
 		if (!ins->values_list || ! ins->values_list->data) {
-			g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+			g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 				     _("INSERT statement must contain values to insert"));
 			gda_sql_statement_free (sqlst);
 			return FALSE;
 		}
 		if (ins->values_list->next) {
-			g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+			g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 				     _("INSERT statement must insert only one row"));
 			gda_sql_statement_free (sqlst);
 			return FALSE;
@@ -888,7 +889,7 @@
 				g_object_set (G_OBJECT (mod_stmt), "structure", sqlst, NULL);
 			}
 			else  {
-				g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+				g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 				     _("DELETE statement must have a WHERE part"));
 				gda_sql_statement_free (sqlst);
 				return FALSE;
@@ -902,7 +903,7 @@
 				GDA_SQL_ANY_PART (del->cond)->parent = GDA_SQL_ANY_PART (del);
 				g_object_set (G_OBJECT (mod_stmt), "structure", sqlst, NULL);
 			}
-			else if (! gda_pmodel_set_row_selection_condition (model, del->cond, error)) {
+			else if (! gda_data_select_set_row_selection_condition (model, del->cond, error)) {
 				gda_sql_statement_free (sqlst);
 				return FALSE;
 			}
@@ -928,7 +929,7 @@
 				g_object_set (G_OBJECT (mod_stmt), "structure", sqlst, NULL);
 			}
 			else  {
-				g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+				g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 				     _("UPDATE statement must have a WHERE part"));
 				gda_sql_statement_free (sqlst);
 				return FALSE;
@@ -942,7 +943,7 @@
 				GDA_SQL_ANY_PART (upd->cond)->parent = GDA_SQL_ANY_PART (upd);
 				g_object_set (G_OBJECT (mod_stmt), "structure", sqlst, NULL);
 			}
-			else if (! gda_pmodel_set_row_selection_condition (model, upd->cond, error)) {
+			else if (! gda_data_select_set_row_selection_condition (model, upd->cond, error)) {
 				gda_sql_statement_free (sqlst);
 				return FALSE;
 			}
@@ -981,23 +982,23 @@
 				gboolean is_old;
 
 				if (!param_name_to_int (gda_holder_get_id (holder), &num, &is_old)) {
-					g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+					g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 						     _("Modification statement uses an unknown '%s' parameter"),
 						     gda_holder_get_id (holder));
 					g_object_unref (params);
 					return FALSE;
 				}
-				if (num > gda_pmodel_get_n_columns ((GdaDataModel*) model)) {
-					g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+				if (num > gda_data_select_get_n_columns ((GdaDataModel*) model)) {
+					g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 						     _("Column %d out of range (0-%d)"), num, 
-						     gda_pmodel_get_n_columns ((GdaDataModel*) model)-1);
+						     gda_data_select_get_n_columns ((GdaDataModel*) model)-1);
 					g_object_unref (params);
 					return FALSE;
 				}
 				gda_set_add_holder (model->priv->modif_set, holder);
 			}
 			else if (gda_holder_get_g_type (holder) != gda_holder_get_g_type (eholder)) {
-				g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+				g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 					     _("Modification statement's  '%s' parameter is a %s when it should be a %s"),
 					     gda_holder_get_id (holder),
 					     gda_g_type_to_string (gda_holder_get_g_type (holder)),
@@ -1012,7 +1013,7 @@
 		g_object_ref (mod_stmt);
 	}
 	else {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Modification statement must be an INSERT, UPDATE or DELETE statement"));
 		return FALSE;
 	}
@@ -1033,25 +1034,25 @@
 }
 
 /**
- * gda_pmodel_compute_modification_statements
- * @model: a #GdaPModel data model
+ * gda_data_select_compute_modification_statements
+ * @model: a #GdaDataSelect data model
  * @require_pk: FALSE if all fields can be used in the WHERE condition when no primary key exists
  * @error: a place to store errors, or %NULL
  *
  * Makes @model try to compute INSERT, UPDATE and DELETE statements to be used when modifying @model's contents.
- * Note: any modification statement set using gda_pmodel_set_modification_statement() will first be unset
+ * Note: any modification statement set using gda_data_select_set_modification_statement() will first be unset
  *
  * Returns: TRUE if no error occurred. If FALSE is returned, then some modification statement may still have been
  * computed
  */
 gboolean
-gda_pmodel_compute_modification_statements (GdaPModel *model, gboolean require_pk, GError **error)
+gda_data_select_compute_modification_statements (GdaDataSelect *model, gboolean require_pk, GError **error)
 {
 	GdaStatement *stmt;
 	ModType mtype;
 	gboolean retval = TRUE;
 	GdaStatement *modif_stmts[NB_QUERIES];
-	g_return_val_if_fail (GDA_IS_PMODEL (model), FALSE);
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), FALSE);
 	g_return_val_if_fail (model->priv, FALSE);
 
 	stmt = check_acceptable_statement (model, error);
@@ -1059,7 +1060,7 @@
 		return FALSE;
 
 	if (!model->priv->cnc) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_CONNECTION_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_CONNECTION_ERROR,
 			     _("No connection to use"));
 		return FALSE;
 	}
@@ -1082,7 +1083,7 @@
 			g_free (sql);
 #endif
 			if (modif_stmts[mtype] &&
-			    ! gda_pmodel_set_modification_statement (model, modif_stmts[mtype], error)) {
+			    ! gda_data_select_set_modification_statement (model, modif_stmts[mtype], error)) {
 				retval = FALSE;
 				break;
 			}
@@ -1105,7 +1106,7 @@
 
 	GdaSqlOperation *op = (GdaSqlOperation*) part;
 	if (op->operator != GDA_SQL_OPERATOR_TYPE_EQ) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Invalid unique row condition (ony equal operators are allowed)"));
 		return FALSE;
 	}
@@ -1114,22 +1115,22 @@
 }
 
 /**
- * gda_pmodel_set_row_selection_condition
- * @model: a #GdaPModel data model
+ * gda_data_select_set_row_selection_condition
+ * @model: a #GdaDataSelect data model
  * @expr: a #GdaSqlExpr expression
  * @error: a place to store errors, or %NULL
  *
- * Offers the same features as gda_pmodel_set_row_selection_condition_sql() but using a #GdaSqlExpr
+ * Offers the same features as gda_data_select_set_row_selection_condition_sql() but using a #GdaSqlExpr
  * structure instead of an SQL syntax.
  *
  * Returns: TRUE if no error occurred
  */
 gboolean
-gda_pmodel_set_row_selection_condition  (GdaPModel *model, GdaSqlExpr *expr, GError **error)
+gda_data_select_set_row_selection_condition  (GdaDataSelect *model, GdaSqlExpr *expr, GError **error)
 {
 	gboolean valid;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), FALSE);
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), FALSE);
 	g_return_val_if_fail (model->priv, FALSE);
 	g_return_val_if_fail (expr, FALSE);
 
@@ -1137,7 +1138,7 @@
 		return FALSE;
 
 	if (model->priv->unique_row_condition) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Unique row condition has already been specified"));
 		return FALSE;
 	}
@@ -1153,8 +1154,8 @@
 }
 
 /**
- * gda_pmodel_set_row_selection_condition_sql
- * @model: a #GdaPModel data model
+ * gda_data_select_set_row_selection_condition_sql
+ * @model: a #GdaDataSelect data model
  * @sql_where: an SQL condition (withouth the WHERE keyword)
  * @error: a place to store errors, or %NULL
  *
@@ -1170,12 +1171,12 @@
  *
  * For more information about the syntax of the parameters (named <![CDATA["##-1::int"]]> for example), see the
  * <link linkend="GdaSqlParser.description">GdaSqlParser</link> documentation, and 
- * gda_pmodel_set_modification_statement().
+ * gda_data_select_set_modification_statement().
  *
  * Returns: TRUE if no error occurred
  */
 gboolean
-gda_pmodel_set_row_selection_condition_sql (GdaPModel *model, const gchar *sql_where, GError **error)
+gda_data_select_set_row_selection_condition_sql (GdaDataSelect *model, const gchar *sql_where, GError **error)
 {
 	GdaSqlParser *parser;
 	GdaStatement *stmt;
@@ -1185,14 +1186,14 @@
 	GdaSqlStatement *sqlst;
 	GdaSqlStatementSelect *selstmt;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), FALSE);
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), FALSE);
 	g_return_val_if_fail (model->priv, FALSE);
 
 	if (!check_acceptable_statement (model, error))
 		return FALSE;
 
 	if (model->priv->unique_row_condition) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Unique row condition has already been specified"));
 		return FALSE;
 	}
@@ -1210,7 +1211,7 @@
 	}
 	if (remain) {
 		g_object_unref (stmt);
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_SQL_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_SQL_ERROR,
 			     _("Incorrect filter expression"));
 		g_free (sql);
 		return FALSE;
@@ -1221,7 +1222,7 @@
 	g_object_get (stmt, "structure", &sqlst, NULL);
 	selstmt = (GdaSqlStatementSelect *) sqlst->contents;
 	
-	retval = gda_pmodel_set_row_selection_condition (model, selstmt->where_cond, error);
+	retval = gda_data_select_set_row_selection_condition (model, selstmt->where_cond, error);
 	gda_sql_statement_free (sqlst);
 
 	g_object_unref (stmt);
@@ -1229,11 +1230,11 @@
 }
 
 /**
- * gda_pmodel_compute_row_selection_condition
- * @model: a #GdaPModel object
+ * gda_data_select_compute_row_selection_condition
+ * @model: a #GdaDataSelect object
  * @error: a place to store errors, or %NULL
  *
- * Offers the same features as gda_pmodel_set_row_selection_condition() but the expression
+ * Offers the same features as gda_data_select_set_row_selection_condition() but the expression
  * is computed from the meta data associated to the connection being used when @model was created.
  *
  * NOTE1: make sure the meta data associated to the connection is up to date before using this
@@ -1245,7 +1246,7 @@
  * Returns: TRUE if no error occurred.
  */
 gboolean
-gda_pmodel_compute_row_selection_condition (GdaPModel *model, GError **error)
+gda_data_select_compute_row_selection_condition (GdaDataSelect *model, GError **error)
 {
 	GdaSqlExpr *expr;
 	gboolean retval = FALSE;
@@ -1257,7 +1258,7 @@
 	GdaMetaDbObject *dbo;
 	GValue *nvalue = NULL;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), FALSE);
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), FALSE);
 	g_return_val_if_fail (model->priv, FALSE);
 
 	stmt = check_acceptable_statement (model, error);
@@ -1265,7 +1266,7 @@
 		return FALSE;
 
 	if (!model->priv->cnc) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_CONNECTION_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_CONNECTION_ERROR,
 			     _("No connection to use"));
 		return FALSE;
 	}
@@ -1274,18 +1275,18 @@
 	g_assert (sqlst->stmt_type == GDA_SQL_STATEMENT_SELECT);
 	select = (GdaSqlStatementSelect*) sqlst->contents;
 	if (!select->from || ! select->from->targets || ! select->from->targets->data) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_SQL_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_SQL_ERROR,
 			     _("No table to select from in SELECT statement"));
 		goto out;
 	}
 	if (select->from->targets->next) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_SQL_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_SQL_ERROR,
 			     _("SELECT statement uses more than one table to select from"));
 		goto out;
 	}
 	target = (GdaSqlSelectTarget *) select->from->targets->data;
 	if (!target->table_name) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_SQL_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_SQL_ERROR,
 			     _("No table to select from in SELECT statement"));
 		goto out;
 	}
@@ -1296,7 +1297,7 @@
 		goto out;
        
 	expr = gda_compute_unique_table_row_condition (select, GDA_META_TABLE (dbo), TRUE, error);
-	retval = gda_pmodel_set_row_selection_condition (model, expr, error);
+	retval = gda_data_select_set_row_selection_condition (model, expr, error);
 
  out:
 	if (sqlst)
@@ -1313,12 +1314,12 @@
  * GdaDataModel interface implementation
  */
 static gint
-gda_pmodel_get_n_rows (GdaDataModel *model)
+gda_data_select_get_n_rows (GdaDataModel *model)
 {
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 	gint retval;
-	g_return_val_if_fail (GDA_IS_PMODEL (model), 0);
-	imodel = GDA_PMODEL (model);
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), 0);
+	imodel = GDA_DATA_SELECT (model);
 	g_return_val_if_fail (imodel->priv, 0);
 
 	retval = imodel->advertized_nrows;
@@ -1333,11 +1334,11 @@
 }
 
 static gint
-gda_pmodel_get_n_columns (GdaDataModel *model)
+gda_data_select_get_n_columns (GdaDataModel *model)
 {
-	GdaPModel *imodel;
-	g_return_val_if_fail (GDA_IS_PMODEL (model), 0);
-	imodel = GDA_PMODEL (model);
+	GdaDataSelect *imodel;
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), 0);
+	imodel = GDA_DATA_SELECT (model);
 	g_return_val_if_fail (imodel->priv, 0);
 	
 	if (imodel->prep_stmt)
@@ -1347,24 +1348,24 @@
 }
 
 static GdaColumn *
-gda_pmodel_describe_column (GdaDataModel *model, gint col)
+gda_data_select_describe_column (GdaDataModel *model, gint col)
 {
-	GdaPModel *imodel;
-	g_return_val_if_fail (GDA_IS_PMODEL (model), NULL);
-	imodel = GDA_PMODEL (model);
+	GdaDataSelect *imodel;
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), NULL);
+	imodel = GDA_DATA_SELECT (model);
 	g_return_val_if_fail (imodel->priv, NULL);
 
 	return g_slist_nth_data (imodel->priv->columns, col);
 }
 
 static GdaDataModelAccessFlags
-gda_pmodel_get_access_flags (GdaDataModel *model)
+gda_data_select_get_access_flags (GdaDataModel *model)
 {
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 	GdaDataModelAccessFlags flags = 0;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), 0);
-	imodel = GDA_PMODEL (model);
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), 0);
+	imodel = GDA_DATA_SELECT (model);
 	g_return_val_if_fail (imodel->priv, 0);
 
 	if (imodel->priv->usage_flags & GDA_DATA_MODEL_ACCESS_RANDOM)
@@ -1391,7 +1392,7 @@
  * Returns: a row number, or -1 if row number does not exist
  */
 static gint
-external_to_internal_row (GdaPModel *model, gint ext_row, GError **error)
+external_to_internal_row (GdaDataSelect *model, gint ext_row, GError **error)
 {
 	gint nrows;
 	gint int_row = ext_row;
@@ -1409,12 +1410,12 @@
 	}
 	
 	/* check row number validity */
-	nrows = model->advertized_nrows < 0 ? gda_pmodel_get_n_rows ((GdaDataModel*) model) : 
+	nrows = model->advertized_nrows < 0 ? gda_data_select_get_n_rows ((GdaDataModel*) model) : 
 		model->advertized_nrows;
 	if ((ext_row < 0) || ((nrows >= 0) && (int_row >= nrows))) {
 		g_set_error (error, GDA_DATA_MODEL_ERROR, GDA_DATA_MODEL_ROW_OUT_OF_RANGE_ERROR,
 			     _("Row %d out of range (0-%d)"), ext_row, 
-			     gda_pmodel_get_n_rows ((GdaDataModel*) model) - 1);
+			     gda_data_select_get_n_rows ((GdaDataModel*) model) - 1);
 		return -1;
 	}
 
@@ -1426,7 +1427,7 @@
 {
 	g_print (" row %d => %p\n", *(const gint*) key, value);
 }
-static void dump_d (GdaPModel *model)
+static void dump_d (GdaDataSelect *model)
 {
 	if (model->priv->upd_rows) {
 		g_print ("Delayed SELECT for %p:\n", model);
@@ -1436,14 +1437,14 @@
 #endif
 
 static const GValue *
-gda_pmodel_get_value_at (GdaDataModel *model, gint col, gint row)
+gda_data_select_get_value_at (GdaDataModel *model, gint col, gint row)
 {
 	GdaRow *prow;
 	gint int_row, irow;
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), NULL);
-	imodel = (GdaPModel *) model;
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), NULL);
+	imodel = (GdaDataSelect *) model;
 	g_return_val_if_fail (imodel->priv, NULL);
 
 	/* available only if GDA_DATA_MODEL_ACCESS_RANDOM */
@@ -1522,13 +1523,13 @@
 }
 
 static GdaValueAttribute
-gda_pmodel_get_attributes_at (GdaDataModel *model, gint col, gint row)
+gda_data_select_get_attributes_at (GdaDataModel *model, gint col, gint row)
 {
 	GdaValueAttribute flags = 0;
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), 0);
-	imodel = (GdaPModel *) model;
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), 0);
+	imodel = (GdaDataSelect *) model;
 	g_return_val_if_fail (imodel->priv, 0);
 	
 	if (! imodel->priv->modif_stmts [UPD_QUERY])
@@ -1538,12 +1539,12 @@
 }
 
 static GdaDataModelIter *
-gda_pmodel_create_iter (GdaDataModel *model)
+gda_data_select_create_iter (GdaDataModel *model)
 {
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), 0);
-	imodel = (GdaPModel *) model;
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), 0);
+	imodel = (GdaDataSelect *) model;
 	g_return_val_if_fail (imodel->priv, 0);
 
 	if (imodel->priv->usage_flags & GDA_DATA_MODEL_ACCESS_RANDOM) 
@@ -1561,17 +1562,17 @@
 	}
 }
 
-static void update_iter (GdaPModel *imodel, GdaRow *prow);
+static void update_iter (GdaDataSelect *imodel, GdaRow *prow);
 static gboolean
-gda_pmodel_iter_next (GdaDataModel *model, GdaDataModelIter *iter)
+gda_data_select_iter_next (GdaDataModel *model, GdaDataModelIter *iter)
 {
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 	GdaRow *prow = NULL;
 	gint target_iter_row;
 	gint irow, int_row;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), FALSE);
-	imodel = (GdaPModel *) model;
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), FALSE);
+	imodel = (GdaDataSelect *) model;
 	g_return_val_if_fail (imodel->priv, FALSE);
 	g_return_val_if_fail (CLASS (model)->fetch_next, FALSE);
 
@@ -1609,15 +1610,15 @@
 }
 
 static gboolean
-gda_pmodel_iter_prev (GdaDataModel *model, GdaDataModelIter *iter)
+gda_data_select_iter_prev (GdaDataModel *model, GdaDataModelIter *iter)
 {
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 	GdaRow *prow = NULL;
 	gint target_iter_row;
 	gint irow, int_row;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), FALSE);
-	imodel = (GdaPModel *) model;
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), FALSE);
+	imodel = (GdaDataSelect *) model;
 	g_return_val_if_fail (imodel->priv, FALSE);
 	g_return_val_if_fail (CLASS (model)->fetch_prev, FALSE);
 
@@ -1657,14 +1658,14 @@
 }
 
 static gboolean
-gda_pmodel_iter_at_row (GdaDataModel *model, GdaDataModelIter *iter, gint row)
+gda_data_select_iter_at_row (GdaDataModel *model, GdaDataModelIter *iter, gint row)
 {
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 	GdaRow *prow = NULL;
 	gint irow, int_row;
 
-	g_return_val_if_fail (GDA_IS_PMODEL (model), FALSE);
-	imodel = (GdaPModel *) model;
+	g_return_val_if_fail (GDA_IS_DATA_SELECT (model), FALSE);
+	imodel = (GdaDataSelect *) model;
 	g_return_val_if_fail (imodel->priv, FALSE);
 
 	int_row = external_to_internal_row (imodel, row, NULL);
@@ -1708,7 +1709,7 @@
 }
 
 static void
-update_iter (GdaPModel *imodel, GdaRow *prow)
+update_iter (GdaDataSelect *imodel, GdaRow *prow)
 {
         gint i;
 	GdaDataModelIter *iter = imodel->priv->iter;
@@ -1739,7 +1740,7 @@
  * Returns: a new #GdaStatement, or %NULL
  */
 static GdaStatement *
-compute_single_update_stmt (GdaPModel *model, BVector *bv, GError **error)
+compute_single_update_stmt (GdaDataSelect *model, BVector *bv, GError **error)
 {
 	GdaSqlStatement *sqlst;
 	GdaSqlStatementUpdate *upd;
@@ -1791,7 +1792,7 @@
 	if (field_found)
 		updstmt = (GdaStatement *) g_object_new (GDA_TYPE_STATEMENT, "structure", sqlst, NULL);
 	else 
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 			     _("Some columns can't be modified"));
 	gda_sql_statement_free (sqlst);
 
@@ -1832,7 +1833,7 @@
  * Returns: a new #GdaStatement, or %NULL
  */
 static GdaStatement *
-compute_single_insert_stmt (GdaPModel *model, BVector *bv, GError **error)
+compute_single_insert_stmt (GdaDataSelect *model, BVector *bv, GError **error)
 {
 	GdaSqlStatement *sqlst;
 	GdaSqlStatementInsert *ins;
@@ -1884,7 +1885,7 @@
 	if (field_found)
 		insstmt = (GdaStatement *) g_object_new (GDA_TYPE_STATEMENT, "structure", sqlst, NULL);
 	else 
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 			     _("Some columns can't be modified"));
 	gda_sql_statement_free (sqlst);
 
@@ -1929,7 +1930,7 @@
  * Returns: a new #GdaStatement, or %NULL
  */
 static GdaStatement *
-compute_single_select_stmt (GdaPModel *model, GError **error)
+compute_single_select_stmt (GdaDataSelect *model, GError **error)
 {
 	GdaStatement *sel_stmt;
 	GdaStatement *ret_stmt = NULL;
@@ -1937,14 +1938,14 @@
 	GdaSqlExpr *row_cond = NULL;
 
 	if (! model->prep_stmt) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Internal error: the \"prepared-stmt\" property has not been set"));
 		return NULL;
 	}
 
 	sel_stmt = gda_pstmt_get_gda_statement (model->prep_stmt);
 	if (! sel_stmt) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Internal error: can't get the prepared statement's actual statement"));
 		return NULL;
 	}
@@ -1962,7 +1963,7 @@
 		row_cond = del->cond;
 		del->cond = NULL;
 		gda_sql_statement_free (del_sqlst);
-		if (!gda_pmodel_set_row_selection_condition (model, row_cond, NULL)) {
+		if (!gda_data_select_set_row_selection_condition (model, row_cond, NULL)) {
 			gda_sql_expr_free (row_cond);
 			row_cond = NULL;
 		}
@@ -1978,20 +1979,20 @@
 		row_cond = upd->cond;
 		upd->cond = NULL;
 		gda_sql_statement_free (upd_sqlst);
-		if (!gda_pmodel_set_row_selection_condition (model, row_cond, NULL)) {
+		if (!gda_data_select_set_row_selection_condition (model, row_cond, NULL)) {
 			gda_sql_expr_free (row_cond);
 			row_cond = NULL;
 		}
 	}
 	if (!row_cond) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Unable to identify a way to fetch a single row"));
 		return NULL;
 	}
 		
 	g_object_get (G_OBJECT (sel_stmt), "structure", &sel_sqlst, NULL);
 	if (sel_sqlst->stmt_type != GDA_SQL_STATEMENT_SELECT) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Can only operate on non compound SELECT statements"));
 		gda_sql_statement_free (sel_sqlst);
 		gda_sql_expr_free (row_cond);
@@ -2075,7 +2076,7 @@
  * REM: @bv is stolen here
  */
 static gboolean
-vector_set_value_at (GdaPModel *imodel, BVector *bv, gint row, GError **error)
+vector_set_value_at (GdaDataSelect *imodel, BVector *bv, gint row, GError **error)
 {
 	gint int_row, i, ncols;
 	GdaHolder *holder;
@@ -2092,7 +2093,7 @@
 		return FALSE;
 	}
 	if (! imodel->priv->modif_stmts [UPD_QUERY]) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 			     _("No UPDATE statement provided"));
 		return FALSE;
 	}
@@ -2119,7 +2120,7 @@
 	}
 
 	/* give values to params for old values */
-	ncols = gda_pmodel_get_n_columns ((GdaDataModel*) imodel);
+	ncols = gda_data_select_get_n_columns ((GdaDataModel*) imodel);
 	for (i = 0; i < ncols; i++) {
 		str = g_strdup_printf ("-%d", i);
 		holder = gda_set_get_holder (imodel->priv->modif_set, str);
@@ -2127,7 +2128,7 @@
 		if (holder) {
 			if (! gda_holder_set_value (holder,
 						    gda_data_model_get_value_at ((GdaDataModel*) imodel, i, int_row))) {
-				g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_VALUE_ERROR,
+				g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_VALUE_ERROR,
 					     _("Wrong value type"));
 				return FALSE;
 			}
@@ -2199,14 +2200,14 @@
 }
 
 static gboolean
-gda_pmodel_set_value_at (GdaDataModel *model, gint col, gint row, const GValue *value, GError **error)
+gda_data_select_set_value_at (GdaDataModel *model, gint col, gint row, const GValue *value, GError **error)
 {
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 	gint ncols;
 	GdaHolder *holder;
 	gchar *str;
 
-	imodel = (GdaPModel *) model;
+	imodel = (GdaDataSelect *) model;
 	g_return_val_if_fail (imodel->priv, FALSE);
 
 	if (! (imodel->priv->usage_flags & GDA_DATA_MODEL_ACCESS_RANDOM)) {
@@ -2215,15 +2216,15 @@
 		return FALSE;
 	}
 	if (! imodel->priv->modif_stmts [UPD_QUERY]) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 			     _("No UPDATE statement provided"));
 		return FALSE;
 	}
 
 	/* arguments check */
-	ncols = gda_pmodel_get_n_columns (model);
+	ncols = gda_data_select_get_n_columns (model);
 	if (col >= ncols) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 			     _("Column %d out of range (0-%d)"), col, ncols-1);
 		return FALSE;
 	}
@@ -2233,12 +2234,12 @@
 	holder = gda_set_get_holder (imodel->priv->modif_set, str);
 	g_free (str);
 	if (! holder) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 			     _("Column %d can't be modified"), col);
 		return FALSE;
 	}
 	if (! gda_holder_set_value (holder, value)) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_VALUE_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_VALUE_ERROR,
 			     _("Wrong value type"));
 		return FALSE;
 	}
@@ -2266,15 +2267,15 @@
 }
 
 static gboolean
-gda_pmodel_set_values (GdaDataModel *model, gint row, GList *values, GError **error)
+gda_data_select_set_values (GdaDataModel *model, gint row, GList *values, GError **error)
 {
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 	gint i, ncols, nvalues;
 	GdaHolder *holder;
 	gchar *str;
 	GList *list;
 
-	imodel = (GdaPModel *) model;
+	imodel = (GdaDataSelect *) model;
 
 	/* arguments check */
 	g_return_val_if_fail (imodel->priv, FALSE);
@@ -2285,15 +2286,15 @@
 		return FALSE;
 	}
 	if (! imodel->priv->modif_stmts [UPD_QUERY]) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 			     _("No UPDATE statement provided"));
 		return FALSE;
 	}
  
-	ncols = gda_pmodel_get_n_columns (model);
+	ncols = gda_data_select_get_n_columns (model);
 	nvalues = g_list_length (values);
 	if (nvalues >= ncols) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 			     _("Too many values (%d as maximum)"), ncols-1);
 		return FALSE;
 	}
@@ -2326,13 +2327,13 @@
 		holder = gda_set_get_holder (imodel->priv->modif_set, str);
 		g_free (str);
 		if (! holder) {
-			g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+			g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 				     _("Column %d can't be modified"), i);
 			bvector_free (bv);
 			return FALSE;
 		}
 		if (! gda_holder_set_value (holder, (GValue *) list->data)) {
-			g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_VALUE_ERROR,
+			g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_VALUE_ERROR,
 				     _("Wrong value type"));
 			bvector_free (bv);
 			return FALSE;
@@ -2343,15 +2344,15 @@
 }
 
 static gint
-gda_pmodel_append_values (GdaDataModel *model, const GList *values, GError **error)
+gda_data_select_append_values (GdaDataModel *model, const GList *values, GError **error)
 {
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 	gint row, int_row, i;
 	GdaHolder *holder;
 	gchar *str;
 	const GList *list;
 
-	imodel = (GdaPModel *) model;
+	imodel = (GdaDataSelect *) model;
 
 	g_return_val_if_fail (imodel->priv, -1);
 
@@ -2361,12 +2362,12 @@
 		return -1;
 	}
 	if (! imodel->priv->modif_stmts [INS_QUERY]) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 			     _("No INSERT statement provided"));
 		return -1;
 	}
-	if (gda_pmodel_get_n_rows (model) < 0) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_ACCESS_ERROR,
+	if (gda_data_select_get_n_rows (model) < 0) {
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_ACCESS_ERROR,
 			     _("Cannot add a row because the number of rows in unknown"));
 		return -1;
 	}
@@ -2393,7 +2394,7 @@
 	if (!has_mods) {
 		/* no actual modification to do */
 		bvector_free (bv);
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 			     _("Missing values to insert in INSERT statement"));
 		
 		return -1;
@@ -2426,13 +2427,13 @@
 		holder = gda_set_get_holder (imodel->priv->modif_set, str);
 		g_free (str);
 		if (! holder) {
-			g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+			g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 				     _("Column %d can't be modified"), i);
 			bvector_free (bv);
 			return -1;
 		}
 		if (! gda_holder_set_value (holder, (GValue *) list->data)) {
-			g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_VALUE_ERROR,
+			g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_VALUE_ERROR,
 				     _("Wrong value type"));
 			bvector_free (bv);
 			return -1;
@@ -2524,14 +2525,14 @@
 
 
 static gboolean
-gda_pmodel_remove_row (GdaDataModel *model, gint row, GError **error)
+gda_data_select_remove_row (GdaDataModel *model, gint row, GError **error)
 {
-	GdaPModel *imodel;
+	GdaDataSelect *imodel;
 	gint int_row, i, ncols, index;
 	GdaHolder *holder;
 	gchar *str;
 
-	imodel = (GdaPModel *) model;
+	imodel = (GdaDataSelect *) model;
 
 	g_return_val_if_fail (imodel->priv, FALSE);
 
@@ -2541,7 +2542,7 @@
 		return FALSE;
 	}
 	if (! imodel->priv->modif_stmts [DEL_QUERY]) {
-		g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
+		g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 			     _("No DELETE statement provided"));
 		return FALSE;
 	}
@@ -2550,7 +2551,7 @@
 	if (int_row < 0)
 		return FALSE;
 
-	ncols = gda_pmodel_get_n_columns (model);
+	ncols = gda_data_select_get_n_columns (model);
 	for (i = 0; i < ncols; i++) {
 		str = g_strdup_printf ("-%d", i);
 		holder = gda_set_get_holder (imodel->priv->modif_set, str);
@@ -2558,7 +2559,7 @@
 		if (holder) {
 			if (! gda_holder_set_value (holder,
 						    gda_data_model_get_value_at (model, i, int_row))) {
-				g_set_error (error, GDA_PMODEL_ERROR, GDA_PMODEL_VALUE_ERROR,
+				g_set_error (error, GDA_DATA_SELECT_ERROR, GDA_DATA_SELECT_VALUE_ERROR,
 					     _("Wrong value type"));
 				return FALSE;
 			}

Copied: trunk/libgda/gda-data-select.h (from r3194, /trunk/libgda/providers-support/gda-pmodel.h)
==============================================================================
--- /trunk/libgda/providers-support/gda-pmodel.h	(original)
+++ trunk/libgda/gda-data-select.h	Sat Aug 30 20:55:43 2008
@@ -20,8 +20,8 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __GDA_PMODEL_H__
-#define __GDA_PMODEL_H__
+#ifndef __GDA_DATA_SELECT_H__
+#define __GDA_DATA_SELECT_H__
 
 #include <glib-object.h>
 #include <libgda/gda-row.h>
@@ -30,32 +30,32 @@
 
 G_BEGIN_DECLS
 
-#define GDA_TYPE_PMODEL            (gda_pmodel_get_type())
-#define GDA_PMODEL(obj)            (G_TYPE_CHECK_INSTANCE_CAST (obj, GDA_TYPE_PMODEL, GdaPModel))
-#define GDA_PMODEL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST (klass, GDA_TYPE_PMODEL, GdaPModelClass))
-#define GDA_IS_PMODEL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE(obj, GDA_TYPE_PMODEL))
-#define GDA_IS_PMODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GDA_TYPE_PMODEL))
-
-typedef struct _GdaPModel        GdaPModel;
-typedef struct _GdaPModelClass   GdaPModelClass;
-typedef struct _GdaPModelPrivate GdaPModelPrivate;
+#define GDA_TYPE_DATA_SELECT            (gda_data_select_get_type())
+#define GDA_DATA_SELECT(obj)            (G_TYPE_CHECK_INSTANCE_CAST (obj, GDA_TYPE_DATA_SELECT, GdaDataSelect))
+#define GDA_DATA_SELECT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST (klass, GDA_TYPE_DATA_SELECT, GdaDataSelectClass))
+#define GDA_IS_DATA_SELECT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE(obj, GDA_TYPE_DATA_SELECT))
+#define GDA_IS_DATA_SELECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GDA_TYPE_DATA_SELECT))
+
+typedef struct _GdaDataSelect        GdaDataSelect;
+typedef struct _GdaDataSelectClass   GdaDataSelectClass;
+typedef struct _GdaDataSelectPrivate GdaDataSelectPrivate;
 
 /* error reporting */
-extern GQuark gda_pmodel_error_quark (void);
-#define GDA_PMODEL_ERROR gda_pmodel_error_quark ()
+extern GQuark gda_data_select_error_quark (void);
+#define GDA_DATA_SELECT_ERROR gda_data_select_error_quark ()
 
 enum {
-	GDA_PMODEL_MODIFICATION_STATEMENT_ERROR,
-	GDA_PMODEL_MISSING_MODIFICATION_STATEMENT_ERROR,
-	GDA_PMODEL_CONNECTION_ERROR,
-	GDA_PMODEL_VALUE_ERROR,
-	GDA_PMODEL_ACCESS_ERROR,
-	GDA_PMODEL_SQL_ERROR
+	GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
+	GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
+	GDA_DATA_SELECT_CONNECTION_ERROR,
+	GDA_DATA_SELECT_VALUE_ERROR,
+	GDA_DATA_SELECT_ACCESS_ERROR,
+	GDA_DATA_SELECT_SQL_ERROR
 };
 
-struct _GdaPModel {
+struct _GdaDataSelect {
 	GObject           object;
-	GdaPModelPrivate *priv;
+	GdaDataSelectPrivate *priv;
 
 	/* read only information */
 	GdaPStmt         *prep_stmt; /* use the "prepared-stmt" property to set this */
@@ -75,35 +75,29 @@
  *     REQUIRED: fetch_prev
  *     OPTIONAL: fetch_at
  */
-struct _GdaPModelClass {
+struct _GdaDataSelectClass {
 	GObjectClass      parent_class;
 
 	/* GDA_DATA_MODEL_ACCESS_RANDOM */
-	gint             (*fetch_nb_rows) (GdaPModel *model);
-	gboolean         (*fetch_random)  (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-	gboolean         (*store_all)     (GdaPModel *model, GError **error);
+	gint             (*fetch_nb_rows) (GdaDataSelect *model);
+	gboolean         (*fetch_random)  (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+	gboolean         (*store_all)     (GdaDataSelect *model, GError **error);
 
 	/* GDA_STATEMENT_MODEL_CURSOR_* */
-	gboolean         (*fetch_next)    (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-	gboolean         (*fetch_prev)    (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-	gboolean         (*fetch_at)      (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
+	gboolean         (*fetch_next)    (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+	gboolean         (*fetch_prev)    (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+	gboolean         (*fetch_at)      (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
 };
 
-GType          gda_pmodel_get_type                     (void) G_GNUC_CONST;
+GType          gda_data_select_get_type                     (void) G_GNUC_CONST;
 
-/* API reserved to provider's implementations */
-void           gda_pmodel_take_row                     (GdaPModel *model, GdaRow *row, gint rownum);
-GdaRow        *gda_pmodel_get_stored_row               (GdaPModel *model, gint rownum);
-GdaConnection *gda_pmodel_get_connection               (GdaPModel *model);
-
-/* public API */
-gboolean       gda_pmodel_set_row_selection_condition     (GdaPModel *model, GdaSqlExpr *expr, GError **error);
-gboolean       gda_pmodel_set_row_selection_condition_sql (GdaPModel *model, const gchar *sql_where, GError **error);
-gboolean       gda_pmodel_compute_row_selection_condition (GdaPModel *model, GError **error);
-
-gboolean       gda_pmodel_set_modification_statement      (GdaPModel *model, GdaStatement *mod_stmt, GError **error);
-gboolean       gda_pmodel_set_modification_statement_sql  (GdaPModel *model, const gchar *sql, GError **error);
-gboolean       gda_pmodel_compute_modification_statements (GdaPModel *model, gboolean require_pk, GError **error);
+gboolean       gda_data_select_set_row_selection_condition     (GdaDataSelect *model, GdaSqlExpr *expr, GError **error);
+gboolean       gda_data_select_set_row_selection_condition_sql (GdaDataSelect *model, const gchar *sql_where, GError **error);
+gboolean       gda_data_select_compute_row_selection_condition (GdaDataSelect *model, GError **error);
+
+gboolean       gda_data_select_set_modification_statement      (GdaDataSelect *model, GdaStatement *mod_stmt, GError **error);
+gboolean       gda_data_select_set_modification_statement_sql  (GdaDataSelect *model, const gchar *sql, GError **error);
+gboolean       gda_data_select_compute_modification_statements (GdaDataSelect *model, gboolean require_pk, GError **error);
 
 G_END_DECLS
 

Modified: trunk/libgda/libgda.h.in
==============================================================================
--- trunk/libgda/libgda.h.in	(original)
+++ trunk/libgda/libgda.h.in	Sat Aug 30 20:55:43 2008
@@ -42,6 +42,7 @@
 #include <libgda/gda-data-model-dir.h>
 #include <libgda/gda-data-access-wrapper.h>
 #include <libgda/gda-data-proxy.h>
+#include <libgda/gda-data-select.h>
 #include <libgda/gda-lockable.h>
 #include <libgda/gda-log.h>
 #include <libgda/gda-quark-list.h>

Modified: trunk/libgda/providers-support/Makefile.am
==============================================================================
--- trunk/libgda/providers-support/Makefile.am	(original)
+++ trunk/libgda/providers-support/Makefile.am	Sat Aug 30 20:55:43 2008
@@ -7,12 +7,11 @@
 	$(LIBGDA_CFLAGS) 
 
 psupport_headers = \
-	gda-pmodel.h \
+	gda-data-select-priv.h \
 	gda-pstmt.h
 
 libgda_psupport_la_SOURCES = \
 	$(psupport_headers) \
-	gda-pmodel.c \
 	gda-pstmt.c
 
 libgda_psupport_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED)

Added: trunk/libgda/providers-support/gda-data-select-priv.h
==============================================================================
--- (empty file)
+++ trunk/libgda/providers-support/gda-data-select-priv.h	Sat Aug 30 20:55:43 2008
@@ -0,0 +1,44 @@
+/* GDA common library
+ * Copyright (C) 2008 The GNOME Foundation.
+ *
+ * AUTHORS:
+ *      Vivien Malerba <malerba gnome-db org>
+ *
+ * This Library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This Library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this Library; see the file COPYING.LIB.  If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GDA_DATA_SELECT_PRIV_H__
+#define __GDA_DATA_SELECT_PRIV_H__
+
+#include <glib-object.h>
+#include <libgda/gda-row.h>
+#include <libgda/providers-support/gda-pstmt.h>
+#include <sql-parser/gda-sql-statement.h>
+#include <libgda/gda-data-select.h>
+
+G_BEGIN_DECLS
+
+
+GType          gda_data_select_get_type                     (void) G_GNUC_CONST;
+
+/* API reserved to provider's implementations */
+void           gda_data_select_take_row                     (GdaDataSelect *model, GdaRow *row, gint rownum);
+GdaRow        *gda_data_select_get_stored_row               (GdaDataSelect *model, gint rownum);
+GdaConnection *gda_data_select_get_connection               (GdaDataSelect *model);
+
+G_END_DECLS
+
+#endif

Modified: trunk/libgda/sqlite/gda-sqlite-recordset.c
==============================================================================
--- trunk/libgda/sqlite/gda-sqlite-recordset.c	(original)
+++ trunk/libgda/sqlite/gda-sqlite-recordset.c	Sat Aug 30 20:55:43 2008
@@ -39,10 +39,10 @@
 static void gda_sqlite_recordset_dispose   (GObject *object);
 
 /* virtual methods */
-static gint    gda_sqlite_recordset_fetch_nb_rows (GdaPModel *model);
-static gboolean gda_sqlite_recordset_fetch_random (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
+static gint    gda_sqlite_recordset_fetch_nb_rows (GdaDataSelect *model);
+static gboolean gda_sqlite_recordset_fetch_random (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
 
-static gboolean gda_sqlite_recordset_fetch_next (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
+static gboolean gda_sqlite_recordset_fetch_next (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
 
 
 static GdaRow *fetch_next_sqlite_row (GdaSqliteRecordset *model, gboolean do_store, GError **error);
@@ -69,7 +69,7 @@
 gda_sqlite_recordset_class_init (GdaSqliteRecordsetClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GdaPModelClass *pmodel_class = GDA_PMODEL_CLASS (klass);
+	GdaDataSelectClass *pmodel_class = GDA_DATA_SELECT_CLASS (klass);
 
 	parent_class = g_type_class_peek_parent (klass);
 
@@ -90,7 +90,7 @@
 	g_return_if_fail (GDA_IS_SQLITE_RECORDSET (recset));
 
 	if (recset->priv) {
-		GDA_SQLITE_PSTMT (GDA_PMODEL (object)->prep_stmt)->stmt_used = FALSE;
+		GDA_SQLITE_PSTMT (GDA_DATA_SELECT (object)->prep_stmt)->stmt_used = FALSE;
 		if (recset->priv->tmp_row)
 			g_object_unref (recset->priv->tmp_row);
 		g_free (recset->priv);
@@ -124,7 +124,7 @@
 		};
 		g_static_mutex_lock (&registering);
 		if (type == 0)
-			type = g_type_register_static (GDA_TYPE_PMODEL, "GdaSqliteRecordset", &info, 0);
+			type = g_type_register_static (GDA_TYPE_DATA_SELECT, "GdaSqliteRecordset", &info, 0);
 		g_static_mutex_unlock (&registering);
 	}
 
@@ -136,7 +136,7 @@
 {
 	gint i;
 	gint *missing_cols, nb_missing;
-	GdaPModel *pmodel = (GdaPModel*) model;
+	GdaDataSelect *pmodel = (GdaDataSelect*) model;
 
 	missing_cols = g_new (gint, pmodel->prep_stmt->ncols);
 	for (nb_missing = 0, i = 0; i < pmodel->prep_stmt->ncols; i++) {
@@ -325,10 +325,10 @@
 	GdaRow *prow = NULL;
 
 	cdata = (SqliteConnectionData*) gda_connection_internal_get_provider_data 
-		(gda_pmodel_get_connection ((GdaPModel*) model));
+		(gda_data_select_get_connection ((GdaDataSelect*) model));
 	if (!cdata)
 		return NULL;
-	ps = GDA_SQLITE_PSTMT (GDA_PMODEL (model)->prep_stmt);
+	ps = GDA_SQLITE_PSTMT (GDA_DATA_SELECT (model)->prep_stmt);
 
 	rc = sqlite3_step (ps->sqlite_stmt);
 	switch (rc) {
@@ -443,7 +443,7 @@
 		else {
 			if (do_store) {
 				/* insert row */
-				gda_pmodel_take_row (GDA_PMODEL (model), prow, model->priv->next_row_num);
+				gda_data_select_take_row (GDA_DATA_SELECT (model), prow, model->priv->next_row_num);
 			}
 			model->priv->next_row_num ++;
 		}
@@ -457,7 +457,7 @@
 			     GDA_SERVER_PROVIDER_INTERNAL_ERROR, sqlite3_errmsg (cdata->connection));
 		break;
 	case SQLITE_DONE:
-		GDA_PMODEL (model)->advertized_nrows = model->priv->next_row_num;
+		GDA_DATA_SELECT (model)->advertized_nrows = model->priv->next_row_num;
 		break;
 	case SQLITE_MISUSE:
 		g_set_error (error, GDA_SERVER_PROVIDER_ERROR,
@@ -470,10 +470,10 @@
 
 
 /*
- * GdaPModel virtual methods
+ * GdaDataSelect virtual methods
  */
 static gint
-gda_sqlite_recordset_fetch_nb_rows (GdaPModel *model)
+gda_sqlite_recordset_fetch_nb_rows (GdaDataSelect *model)
 {
 	GdaSqliteRecordset *imodel;
 	GdaRow *prow = NULL;
@@ -491,10 +491,10 @@
 /*
  * Create a new filled #GdaRow object for the row at position @rownum.
  *
- * Each new #GdaRow created is "given" to the #GdaPModel implementation using gda_pmodel_take_row ().
+ * Each new #GdaRow created is "given" to the #GdaDataSelect implementation using gda_data_select_take_row ().
  */
 static gboolean
-gda_sqlite_recordset_fetch_random (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_sqlite_recordset_fetch_random (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaSqliteRecordset *imodel;
 
@@ -505,8 +505,8 @@
 	for (; imodel->priv->next_row_num <= rownum; ) {
 		*prow = fetch_next_sqlite_row (imodel, TRUE, error);
 		if (!*prow) {
-			/*if (GDA_PMODEL (model)->advertized_nrows >= 0), it's not an error */
-			if ((GDA_PMODEL (model)->advertized_nrows >= 0) && 
+			/*if (GDA_DATA_SELECT (model)->advertized_nrows >= 0), it's not an error */
+			if ((GDA_DATA_SELECT (model)->advertized_nrows >= 0) && 
 			    (imodel->priv->next_row_num < rownum)) {
 				g_set_error (error, 0,
 					     GDA_DATA_MODEL_ROW_OUT_OF_RANGE_ERROR,
@@ -522,11 +522,11 @@
 /*
  * Create a new filled #GdaRow object for the next cursor row
  *
- * Each new #GdaRow created is referenced only by imodel->priv->tmp_row (the #GdaPModel implementation
+ * Each new #GdaRow created is referenced only by imodel->priv->tmp_row (the #GdaDataSelect implementation
  * never keeps a reference to it). Before a new #GdaRow gets created, the previous one, if set, is discarded.
  */
 static gboolean
-gda_sqlite_recordset_fetch_next (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_sqlite_recordset_fetch_next (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaSqliteRecordset *imodel = (GdaSqliteRecordset*) model;
 

Modified: trunk/libgda/sqlite/gda-sqlite-recordset.h
==============================================================================
--- trunk/libgda/sqlite/gda-sqlite-recordset.h	(original)
+++ trunk/libgda/sqlite/gda-sqlite-recordset.h	Sat Aug 30 20:55:43 2008
@@ -27,7 +27,7 @@
 
 #include <libgda/gda-value.h>
 #include <libgda/gda-connection.h>
-#include <libgda/providers-support/gda-pmodel.h>
+#include <libgda/providers-support/gda-data-select-priv.h>
 #include "gda-sqlite-pstmt.h"
 
 G_BEGIN_DECLS
@@ -43,12 +43,12 @@
 typedef struct _GdaSqliteRecordsetPrivate GdaSqliteRecordsetPrivate;
 
 struct _GdaSqliteRecordset {
-	GdaPModel                  model;
+	GdaDataSelect                  model;
 	GdaSqliteRecordsetPrivate *priv;
 };
 
 struct _GdaSqliteRecordsetClass {
-	GdaPModelClass             parent_class;
+	GdaDataSelectClass             parent_class;
 };
 
 GType         gda_sqlite_recordset_get_type  (void) G_GNUC_CONST;

Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in	(original)
+++ trunk/po/POTFILES.in	Sat Aug 30 20:55:43 2008
@@ -13,6 +13,7 @@
 libgda/gda-data-model-iter.c
 libgda/gda-data-model-query.c
 libgda/gda-data-proxy.c
+libgda/gda-data-select.c
 libgda/gda-easy.c
 libgda/gda-init.c
 libgda/gda-log.c
@@ -33,7 +34,6 @@
 libgda/handlers/gda-handler-string.c
 libgda/handlers/gda-handler-time.c
 libgda/handlers/gda-handler-type.c
-libgda/providers-support/gda-pmodel.c
 libgda/providers-support/gda-pstmt.c
 libgda/sqlite/gda-sqlite-ddl.c
 libgda/sqlite/gda-sqlite-handler-bin.c

Modified: trunk/providers/firebird/gda-firebird-recordset.c
==============================================================================
--- trunk/providers/firebird/gda-firebird-recordset.c	(original)
+++ trunk/providers/firebird/gda-firebird-recordset.c	Sat Aug 30 20:55:43 2008
@@ -37,11 +37,11 @@
 static void gda_firebird_recordset_dispose   (GObject *object);
 
 /* virtual methods */
-static gint     gda_firebird_recordset_fetch_nb_rows (GdaPModel *model);
-static gboolean gda_firebird_recordset_fetch_random (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-static gboolean gda_firebird_recordset_fetch_next (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-static gboolean gda_firebird_recordset_fetch_prev (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-static gboolean gda_firebird_recordset_fetch_at (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
+static gint     gda_firebird_recordset_fetch_nb_rows (GdaDataSelect *model);
+static gboolean gda_firebird_recordset_fetch_random (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+static gboolean gda_firebird_recordset_fetch_next (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+static gboolean gda_firebird_recordset_fetch_prev (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+static gboolean gda_firebird_recordset_fetch_at (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
 
 
 struct _GdaFirebirdRecordsetPrivate {
@@ -69,7 +69,7 @@
 gda_firebird_recordset_class_init (GdaFirebirdRecordsetClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GdaPModelClass *pmodel_class = GDA_PMODEL_CLASS (klass);
+	GdaDataSelectClass *pmodel_class = GDA_DATA_SELECT_CLASS (klass);
 
 	parent_class = g_type_class_peek_parent (klass);
 
@@ -126,7 +126,7 @@
 		};
 		g_static_mutex_lock (&registering);
 		if (type == 0)
-			type = g_type_register_static (GDA_TYPE_PMODEL, "GdaFirebirdRecordset", &info, 0);
+			type = g_type_register_static (GDA_TYPE_DATA_SELECT, "GdaFirebirdRecordset", &info, 0);
 		g_static_mutex_unlock (&registering);
 	}
 
@@ -217,7 +217,7 @@
  * Get the number of rows in @model, if possible
  */
 static gint
-gda_firebird_recordset_fetch_nb_rows (GdaPModel *model)
+gda_firebird_recordset_fetch_nb_rows (GdaDataSelect *model)
 {
 	GdaFirebirdRecordset *imodel;
 
@@ -241,13 +241,13 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row(). If new row objects are "given" to the GdaPModel implemantation
+ * can use gda_data_select_take_row(). If new row objects are "given" to the GdaDataSelect implemantation
  * using that method, then this method should detect when all the data model rows have been analysed
  * (when model->nb_stored_rows == model->advertized_nrows) and then possibly discard the API handle
  * as it won't be used anymore to fetch rows.
  */
 static gboolean 
-gda_firebird_recordset_fetch_random (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_firebird_recordset_fetch_random (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaFirebirdRecordset *imodel;
 
@@ -262,7 +262,7 @@
  * Create and "give" filled #GdaRow object for all the rows in the model
  */
 static gboolean
-gda_firebird_recordset_store_all (GdaPModel *model, GError **error)
+gda_firebird_recordset_store_all (GdaDataSelect *model, GError **error)
 {
 	GdaFirebirdRecordset *imodel;
 	gint i;
@@ -288,10 +288,10 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row().
+ * can use gda_data_select_take_row().
  */
 static gboolean 
-gda_firebird_recordset_fetch_next (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_firebird_recordset_fetch_next (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaFirebirdRecordset *imodel = (GdaFirebirdRecordset*) model;
 
@@ -310,10 +310,10 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row().
+ * can use gda_data_select_take_row().
  */
 static gboolean 
-gda_firebird_recordset_fetch_prev (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_firebird_recordset_fetch_prev (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaFirebirdRecordset *imodel = (GdaFirebirdRecordset*) model;
 
@@ -332,10 +332,10 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row().
+ * can use gda_data_select_take_row().
  */
 static gboolean 
-gda_firebird_recordset_fetch_at (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_firebird_recordset_fetch_at (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaFirebirdRecordset *imodel = (GdaFirebirdRecordset*) model;
 	

Modified: trunk/providers/firebird/gda-firebird-recordset.h
==============================================================================
--- trunk/providers/firebird/gda-firebird-recordset.h	(original)
+++ trunk/providers/firebird/gda-firebird-recordset.h	Sat Aug 30 20:55:43 2008
@@ -24,7 +24,7 @@
 #define __GDA_FIREBIRD_RECORDSET_H__
 
 #include <libgda/libgda.h>
-#include <providers-support/gda-pmodel.h>
+#include <providers-support/gda-data-select.h>
 #include "gda-firebird-pstmt.h"
 
 G_BEGIN_DECLS
@@ -40,12 +40,12 @@
 typedef struct _GdaFirebirdRecordsetPrivate GdaFirebirdRecordsetPrivate;
 
 struct _GdaFirebirdRecordset {
-	GdaPModel                model;
+	GdaDataSelect                model;
 	GdaFirebirdRecordsetPrivate *priv;
 };
 
 struct _GdaFirebirdRecordsetClass {
-	GdaPModelClass             parent_class;
+	GdaDataSelectClass             parent_class;
 };
 
 GType         gda_firebird_recordset_get_type  (void) G_GNUC_CONST;

Modified: trunk/providers/mysql/gda-mysql-recordset.c
==============================================================================
--- trunk/providers/mysql/gda-mysql-recordset.c	(original)
+++ trunk/providers/mysql/gda-mysql-recordset.c	Sat Aug 30 20:55:43 2008
@@ -56,24 +56,24 @@
 
 /* virtual methods */
 static gint
-gda_mysql_recordset_fetch_nb_rows (GdaPModel  *model);
+gda_mysql_recordset_fetch_nb_rows (GdaDataSelect  *model);
 static gboolean
-gda_mysql_recordset_fetch_random (GdaPModel  *model,
+gda_mysql_recordset_fetch_random (GdaDataSelect  *model,
 				  GdaRow    **row,
 				  gint        rownum,
 				  GError    **error);
 static gboolean
-gda_mysql_recordset_fetch_next (GdaPModel  *model,
+gda_mysql_recordset_fetch_next (GdaDataSelect  *model,
 				GdaRow    **row,
 				gint        rownum,
 				GError    **error);
 static gboolean
-gda_mysql_recordset_fetch_prev (GdaPModel  *model,
+gda_mysql_recordset_fetch_prev (GdaDataSelect  *model,
 				GdaRow    **row,
 				gint        rownum,
 				GError    **error);
 static gboolean
-gda_mysql_recordset_fetch_at (GdaPModel  *model,
+gda_mysql_recordset_fetch_at (GdaDataSelect  *model,
 			      GdaRow    **row,
 			      gint        rownum,
 			      GError    **error);
@@ -208,7 +208,7 @@
 gda_mysql_recordset_class_init (GdaMysqlRecordsetClass  *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GdaPModelClass *pmodel_class = GDA_PMODEL_CLASS (klass);
+	GdaDataSelectClass *pmodel_class = GDA_DATA_SELECT_CLASS (klass);
 
 	parent_class = g_type_class_peek_parent (klass);
 
@@ -287,7 +287,7 @@
 		};
 		g_static_mutex_lock (&registering);
 		if (type == 0)
-			type = g_type_register_static (GDA_TYPE_PMODEL, "GdaMysqlRecordset", &info, 0);
+			type = g_type_register_static (GDA_TYPE_DATA_SELECT, "GdaMysqlRecordset", &info, 0);
 		g_static_mutex_unlock (&registering);
 	}
 
@@ -470,7 +470,7 @@
 	
 	model->priv->mysql_stmt = cdata->mysql_stmt;
 
-	((GdaPModel *) model)->advertized_nrows = mysql_stmt_affected_rows (cdata->mysql_stmt);
+	((GdaDataSelect *) model)->advertized_nrows = mysql_stmt_affected_rows (cdata->mysql_stmt);
 	
 
         return GDA_DATA_MODEL (model);
@@ -481,7 +481,7 @@
  * Get the number of rows in @model, if possible
  */
 static gint
-gda_mysql_recordset_fetch_nb_rows (GdaPModel *model)
+gda_mysql_recordset_fetch_nb_rows (GdaDataSelect *model)
 {
 	GdaMysqlRecordset *imodel;
 
@@ -503,19 +503,19 @@
 new_row_from_mysql_stmt (GdaMysqlRecordset  *imodel,
 			 gint                rownum)
 {
-	/* g_print ("*** %s -- %d -- %d\n", __func__, ((GdaPModel *) imodel)->prep_stmt->ncols, rownum); */
+	/* g_print ("*** %s -- %d -- %d\n", __func__, ((GdaDataSelect *) imodel)->prep_stmt->ncols, rownum); */
 	
-	MYSQL_BIND *mysql_bind_result = ((GdaMysqlPStmt *) ((GdaPModel *) imodel)->prep_stmt)->mysql_bind_result;
+	MYSQL_BIND *mysql_bind_result = ((GdaMysqlPStmt *) ((GdaDataSelect *) imodel)->prep_stmt)->mysql_bind_result;
 	g_assert (mysql_bind_result);
 	
-	GdaRow *row = gda_row_new (((GdaPModel *) imodel)->prep_stmt->ncols);
+	GdaRow *row = gda_row_new (((GdaDataSelect *) imodel)->prep_stmt->ncols);
 	gint col;
-	for (col = 0; col < ((GdaPModel *) imodel)->prep_stmt->ncols; ++col) {
+	for (col = 0; col < ((GdaDataSelect *) imodel)->prep_stmt->ncols; ++col) {
 		
 		gint i = col;
 		
 		GValue *value = gda_row_get_value (row, i);
-		GType type = ((GdaPModel *) imodel)->prep_stmt->types[i];
+		GType type = ((GdaDataSelect *) imodel)->prep_stmt->types[i];
 		gda_value_reset_with_type (value, type);
 		
 		int intvalue = 0;
@@ -669,13 +669,13 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row(). If new row objects are "given" to the GdaPModel implemantation
+ * can use gda_data_select_take_row(). If new row objects are "given" to the GdaDataSelect implemantation
  * using that method, then this method should detect when all the data model rows have been analysed
  * (when model->nb_stored_rows == model->advertized_nrows) and then possibly discard the API handle
  * as it won't be used anymore to fetch rows.
  */
 static gboolean 
-gda_mysql_recordset_fetch_random (GdaPModel  *model,
+gda_mysql_recordset_fetch_random (GdaDataSelect  *model,
 				  GdaRow    **row,
 				  gint        rownum,
 				  GError    **error)
@@ -700,7 +700,7 @@
 		return FALSE;
 	
 	*row = new_row_from_mysql_stmt (imodel, rownum);
-	gda_pmodel_take_row (model, *row, rownum);
+	gda_data_select_take_row (model, *row, rownum);
 	
 	if (model->nb_stored_rows == model->advertized_nrows) {
 		/* All the row have been converted.  We could free result now */
@@ -715,7 +715,7 @@
  * Create and "give" filled #GdaRow object for all the rows in the model
  */
 static gboolean
-gda_mysql_recordset_store_all (GdaPModel  *model,
+gda_mysql_recordset_store_all (GdaDataSelect  *model,
 			       GError    **error)
 {
 	GdaMysqlRecordset *imodel;
@@ -742,10 +742,10 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row().
+ * can use gda_data_select_take_row().
  */
 static gboolean 
-gda_mysql_recordset_fetch_next (GdaPModel  *model,
+gda_mysql_recordset_fetch_next (GdaDataSelect  *model,
 				GdaRow    **row,
 				gint        rownum,
 				GError    **error)
@@ -755,7 +755,7 @@
 	// TO_IMPLEMENT;
 	//
 
-	// gda_pmodel_iter_next increments rownum
+	// gda_data_select_iter_next increments rownum
 	return /* TRUE */ gda_mysql_recordset_fetch_random (model, row, rownum, error);
 }
 
@@ -769,10 +769,10 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row().
+ * can use gda_data_select_take_row().
  */
 static gboolean 
-gda_mysql_recordset_fetch_prev (GdaPModel  *model,
+gda_mysql_recordset_fetch_prev (GdaDataSelect  *model,
 				GdaRow    **row,
 				gint        rownum,
 				GError    **error)
@@ -794,10 +794,10 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row().
+ * can use gda_data_select_take_row().
  */
 static gboolean 
-gda_mysql_recordset_fetch_at (GdaPModel  *model,
+gda_mysql_recordset_fetch_at (GdaDataSelect  *model,
 			      GdaRow    **row,
 			      gint        rownum,
 			      GError    **error)

Modified: trunk/providers/mysql/gda-mysql-recordset.h
==============================================================================
--- trunk/providers/mysql/gda-mysql-recordset.h	(original)
+++ trunk/providers/mysql/gda-mysql-recordset.h	Sat Aug 30 20:55:43 2008
@@ -24,7 +24,7 @@
 #define __GDA_MYSQL_RECORDSET_H__
 
 #include <libgda/libgda.h>
-#include <providers-support/gda-pmodel.h>
+#include <providers-support/gda-data-select-priv.h>
 #include "gda-mysql-pstmt.h"
 
 G_BEGIN_DECLS
@@ -40,12 +40,12 @@
 typedef struct _GdaMysqlRecordsetPrivate GdaMysqlRecordsetPrivate;
 
 struct _GdaMysqlRecordset {
-	GdaPModel                model;
+	GdaDataSelect                model;
 	GdaMysqlRecordsetPrivate *priv;
 };
 
 struct _GdaMysqlRecordsetClass {
-	GdaPModelClass             parent_class;
+	GdaDataSelectClass             parent_class;
 };
 
 GType

Modified: trunk/providers/postgres/gda-postgres-recordset.c
==============================================================================
--- trunk/providers/postgres/gda-postgres-recordset.c	(original)
+++ trunk/providers/postgres/gda-postgres-recordset.c	Sat Aug 30 20:55:43 2008
@@ -53,12 +53,12 @@
 						 GParamSpec *pspec);
 
 /* virtual methods */
-static gint     gda_postgres_recordset_fetch_nb_rows (GdaPModel *model);
-static gboolean gda_postgres_recordset_fetch_random (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-static gboolean gda_postgres_recordset_store_all (GdaPModel *model, GError **error);
-static gboolean gda_postgres_recordset_fetch_next (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-static gboolean gda_postgres_recordset_fetch_prev (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-static gboolean gda_postgres_recordset_fetch_at (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
+static gint     gda_postgres_recordset_fetch_nb_rows (GdaDataSelect *model);
+static gboolean gda_postgres_recordset_fetch_random (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+static gboolean gda_postgres_recordset_store_all (GdaDataSelect *model, GError **error);
+static gboolean gda_postgres_recordset_fetch_next (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+static gboolean gda_postgres_recordset_fetch_prev (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+static gboolean gda_postgres_recordset_fetch_at (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
 
 /* static helper functions */
 static void make_point (GdaGeometricPoint *point, const gchar *value);
@@ -119,7 +119,7 @@
 gda_postgres_recordset_class_init (GdaPostgresRecordsetClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GdaPModelClass *pmodel_class = GDA_PMODEL_CLASS (klass);
+	GdaDataSelectClass *pmodel_class = GDA_DATA_SELECT_CLASS (klass);
 
 	parent_class = g_type_class_peek_parent (klass);
 
@@ -240,7 +240,7 @@
 		};
 		g_static_mutex_lock (&registering);
 		if (type == 0)
-			type = g_type_register_static (GDA_TYPE_PMODEL, "GdaPostgresRecordset", &info, 0);
+			type = g_type_register_static (GDA_TYPE_DATA_SELECT, "GdaPostgresRecordset", &info, 0);
 		g_static_mutex_unlock (&registering);
 	}
 
@@ -343,7 +343,7 @@
 			      "model-usage", GDA_DATA_MODEL_ACCESS_RANDOM, 
 			      "exec-params", exec_params, NULL);
 	model->priv->pg_res = pg_res;
-	((GdaPModel*) model)->advertized_nrows = PQntuples (model->priv->pg_res);
+	((GdaDataSelect*) model)->advertized_nrows = PQntuples (model->priv->pg_res);
 
         return GDA_DATA_MODEL (model);
 }
@@ -412,7 +412,7 @@
  * Get the number of rows in @model, if possible
  */
 static gint
-gda_postgres_recordset_fetch_nb_rows (GdaPModel *model)
+gda_postgres_recordset_fetch_nb_rows (GdaDataSelect *model)
 {
 	GdaPostgresRecordset *imodel;
 
@@ -430,10 +430,10 @@
 /*
  * Create a new filled #GdaRow object for the row at position @rownum.
  *
- * Each new #GdaRow created is "given" to the #GdaPModel implementation using gda_pmodel_take_row ().
+ * Each new #GdaRow created is "given" to the #GdaDataSelect implementation using gda_data_select_take_row ().
  */
 static gboolean
-gda_postgres_recordset_fetch_random (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_postgres_recordset_fetch_random (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaPostgresRecordset *imodel = (GdaPostgresRecordset *) model;
 
@@ -447,7 +447,7 @@
 	}
 
 	*prow = new_row_from_pg_res (imodel, rownum);
-	gda_pmodel_take_row (model, *prow, rownum);
+	gda_data_select_take_row (model, *prow, rownum);
 
 	if (model->nb_stored_rows == model->advertized_nrows) {
 		/* all the rows have been converted from PGresult to GdaRow objects => we can
@@ -463,7 +463,7 @@
  * Create and "give" filled #GdaRow object for all the rows in the model
  */
 static gboolean
-gda_postgres_recordset_store_all (GdaPModel *model, GError **error)
+gda_postgres_recordset_store_all (GdaDataSelect *model, GError **error)
 {
 	GdaPostgresRecordset *imodel = (GdaPostgresRecordset*) model;
 	gint i;
@@ -485,11 +485,11 @@
 /*
  * Create a new filled #GdaRow object for the next cursor row
  *
- * Each new #GdaRow created is referenced only by imodel->priv->tmp_row (the #GdaPModel implementation
+ * Each new #GdaRow created is referenced only by imodel->priv->tmp_row (the #GdaDataSelect implementation
  * never keeps a reference to it). Before a new #GdaRow gets created, the previous one, if set, is discarded.
  */
 static gboolean
-gda_postgres_recordset_fetch_next (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_postgres_recordset_fetch_next (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaPostgresRecordset *imodel = (GdaPostgresRecordset*) model;
 
@@ -522,11 +522,11 @@
 /*
  * Create a new filled #GdaRow object for the previous cursor row
  *
- * Each new #GdaRow created is referenced only by imodel->priv->tmp_row (the #GdaPModel implementation
+ * Each new #GdaRow created is referenced only by imodel->priv->tmp_row (the #GdaDataSelect implementation
  * never keeps a reference to it). Before a new #GdaRow gets created, the previous one, if set, is discarded.
  */
 static gboolean
-gda_postgres_recordset_fetch_prev (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_postgres_recordset_fetch_prev (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaPostgresRecordset *imodel = (GdaPostgresRecordset*) model;
 
@@ -559,11 +559,11 @@
 /*
  * Create a new filled #GdaRow object for the cursor row at position @rownum
  *
- * Each new #GdaRow created is referenced only by imodel->priv->tmp_row (the #GdaPModel implementation
+ * Each new #GdaRow created is referenced only by imodel->priv->tmp_row (the #GdaDataSelect implementation
  * never keeps a reference to it). Before a new #GdaRow gets created, the previous one, if set, is discarded.
  */
 static gboolean
-gda_postgres_recordset_fetch_at (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_postgres_recordset_fetch_at (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaPostgresRecordset *imodel = (GdaPostgresRecordset*) model;
 
@@ -728,14 +728,14 @@
 	gchar *thevalue;
 	gint col;
 
-	for (col = 0; col < ((GdaPModel*) imodel)->prep_stmt->ncols; col++) {
+	for (col = 0; col < ((GdaDataSelect*) imodel)->prep_stmt->ncols; col++) {
 		thevalue = PQgetvalue (imodel->priv->pg_res, pg_res_rownum, col);
 		if (thevalue && (*thevalue != '\0' ? FALSE : PQgetisnull (imodel->priv->pg_res, pg_res_rownum, col)))
 			gda_value_set_null (gda_row_get_value (prow, col));
 		else
-			set_value (gda_pmodel_get_connection ((GdaPModel*) imodel),
+			set_value (gda_data_select_get_connection ((GdaDataSelect*) imodel),
 				   gda_row_get_value (prow, col), 
-				   ((GdaPModel*) imodel)->prep_stmt->types [col], 
+				   ((GdaDataSelect*) imodel)->prep_stmt->types [col], 
 				   thevalue, 
 				   PQgetlength (imodel->priv->pg_res, pg_res_rownum, col));
 	}
@@ -746,7 +746,7 @@
 {
 	GdaRow *prow;
 
-	prow = gda_row_new (((GdaPModel*) imodel)->prep_stmt->ncols);
+	prow = gda_row_new (((GdaDataSelect*) imodel)->prep_stmt->ncols);
 	set_prow_with_pg_res (imodel, prow, pg_res_rownum);
 	return prow;
 }
@@ -777,7 +777,7 @@
         status = PQresultStatus (model->priv->pg_res);
 	model->priv->chunks_read ++;
         if (status != PGRES_TUPLES_OK) {
-		_gda_postgres_make_error (gda_pmodel_get_connection ((GdaPModel*) model), 
+		_gda_postgres_make_error (gda_data_select_get_connection ((GdaDataSelect*) model), 
 					  model->priv->pconn, model->priv->pg_res, error);
                 PQclear (model->priv->pg_res);
                 model->priv->pg_res = NULL;
@@ -801,12 +801,12 @@
 			else
 				model->priv->pg_res_inf = model->priv->pg_pos + 1;
 
-			/* GDA_PMODEL (model)->advertized_nrows and model->priv->pg_pos */
+			/* GDA_DATA_SELECT (model)->advertized_nrows and model->priv->pg_pos */
 			if (nbtuples < model->priv->chunk_size) {
 				if (model->priv->pg_pos == G_MININT) 
-					GDA_PMODEL (model)->advertized_nrows = nbtuples;
+					GDA_DATA_SELECT (model)->advertized_nrows = nbtuples;
 				else
-					GDA_PMODEL (model)->advertized_nrows = model->priv->pg_pos + nbtuples + 1;
+					GDA_DATA_SELECT (model)->advertized_nrows = model->priv->pg_pos + nbtuples + 1;
 
 				model->priv->pg_pos = G_MAXINT;				
 			}
@@ -819,9 +819,9 @@
 		}
 		else {
 			if (model->priv->pg_pos == G_MININT)
-				GDA_PMODEL (model)->advertized_nrows = 0;
+				GDA_DATA_SELECT (model)->advertized_nrows = 0;
 			else
-				GDA_PMODEL (model)->advertized_nrows = model->priv->pg_pos + 1; /* total number of rows */
+				GDA_DATA_SELECT (model)->advertized_nrows = model->priv->pg_pos + 1; /* total number of rows */
 			model->priv->pg_pos = G_MAXINT;
 			retval = FALSE;
 		}
@@ -829,7 +829,7 @@
 
 #ifdef GDA_PG_DEBUG
 	g_print ("--> SIZE = %d (inf = %d) nrows = %d, pg_pos = %d\n", model->priv->pg_res_size, model->priv->pg_res_inf,
-		 GDA_PMODEL (model)->advertized_nrows, model->priv->pg_pos);
+		 GDA_DATA_SELECT (model)->advertized_nrows, model->priv->pg_pos);
 #endif
 
 	return retval;
@@ -847,7 +847,7 @@
 	if (model->priv->pg_pos == G_MININT) 
 		return FALSE;
 	else if (model->priv->pg_pos == G_MAXINT) 
-		g_assert (GDA_PMODEL (model)->advertized_nrows >= 0); /* total number of rows MUST be known at this point */
+		g_assert (GDA_DATA_SELECT (model)->advertized_nrows >= 0); /* total number of rows MUST be known at this point */
 
 	gchar *str;
 	gboolean retval = TRUE;
@@ -869,7 +869,7 @@
         status = PQresultStatus (model->priv->pg_res);
 	model->priv->chunks_read ++;
         if (status != PGRES_TUPLES_OK) {
-		_gda_postgres_make_error (gda_pmodel_get_connection ((GdaPModel*) model),
+		_gda_postgres_make_error (gda_data_select_get_connection ((GdaDataSelect*) model),
 					  model->priv->pconn, model->priv->pg_res, error);
                 PQclear (model->priv->pg_res);
                 model->priv->pg_res = NULL;
@@ -889,7 +889,7 @@
                 if (nbtuples > 0) {
 			/* model->priv->pg_res_inf */
 			if (model->priv->pg_pos == G_MAXINT)
-				model->priv->pg_res_inf = GDA_PMODEL (model)->advertized_nrows - nbtuples;
+				model->priv->pg_res_inf = GDA_DATA_SELECT (model)->advertized_nrows - nbtuples;
 			else
 				model->priv->pg_res_inf = 
 					MAX (model->priv->pg_res_inf - (noffset - model->priv->chunk_size), 0);
@@ -900,7 +900,7 @@
 			}
 			else {
 				if (model->priv->pg_pos == G_MAXINT)
-					model->priv->pg_pos = GDA_PMODEL (model)->advertized_nrows - 1;
+					model->priv->pg_pos = GDA_DATA_SELECT (model)->advertized_nrows - 1;
 				else
 					model->priv->pg_pos = MAX (model->priv->pg_pos - noffset, -1) + nbtuples;
 			}
@@ -913,7 +913,7 @@
 
 #ifdef GDA_PG_DEBUG
 	g_print ("<-- SIZE = %d (inf = %d) nrows = %d, pg_pos = %d\n", model->priv->pg_res_size, model->priv->pg_res_inf,
-		 GDA_PMODEL (model)->advertized_nrows, model->priv->pg_pos);
+		 GDA_DATA_SELECT (model)->advertized_nrows, model->priv->pg_pos);
 #endif
 
 	return retval;
@@ -943,7 +943,7 @@
         status = PQresultStatus (model->priv->pg_res);
         model->priv->chunks_read ++; /* Not really correct, because we are only fetching 1 row, not a whole chunk of rows. */
         if (status != PGRES_TUPLES_OK) {
-		_gda_postgres_make_error (gda_pmodel_get_connection ((GdaPModel*) model), 
+		_gda_postgres_make_error (gda_data_select_get_connection ((GdaDataSelect*) model), 
 					  model->priv->pconn, model->priv->pg_res, error);
                 PQclear (model->priv->pg_res);
                 model->priv->pg_res = NULL;

Modified: trunk/providers/postgres/gda-postgres-recordset.h
==============================================================================
--- trunk/providers/postgres/gda-postgres-recordset.h	(original)
+++ trunk/providers/postgres/gda-postgres-recordset.h	Sat Aug 30 20:55:43 2008
@@ -24,7 +24,7 @@
 #define __GDA_POSTGRES_RECORDSET_H__
 
 #include <libgda/libgda.h>
-#include <providers-support/gda-pmodel.h>
+#include <providers-support/gda-data-select-priv.h>
 #include "gda-postgres-pstmt.h"
 
 G_BEGIN_DECLS
@@ -40,12 +40,12 @@
 typedef struct _GdaPostgresRecordsetPrivate GdaPostgresRecordsetPrivate;
 
 struct _GdaPostgresRecordset {
-	GdaPModel                    model;
+	GdaDataSelect                    model;
 	GdaPostgresRecordsetPrivate *priv;
 };
 
 struct _GdaPostgresRecordsetClass {
-	GdaPModelClass               parent_class;
+	GdaDataSelectClass               parent_class;
 };
 
 GType         gda_postgres_recordset_get_type   (void) G_GNUC_CONST;

Modified: trunk/providers/skel-implementation/capi/gda-capi-recordset.c
==============================================================================
--- trunk/providers/skel-implementation/capi/gda-capi-recordset.c	(original)
+++ trunk/providers/skel-implementation/capi/gda-capi-recordset.c	Sat Aug 30 20:55:43 2008
@@ -37,11 +37,11 @@
 static void gda_capi_recordset_dispose   (GObject *object);
 
 /* virtual methods */
-static gint     gda_capi_recordset_fetch_nb_rows (GdaPModel *model);
-static gboolean gda_capi_recordset_fetch_random (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-static gboolean gda_capi_recordset_fetch_next (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-static gboolean gda_capi_recordset_fetch_prev (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
-static gboolean gda_capi_recordset_fetch_at (GdaPModel *model, GdaRow **prow, gint rownum, GError **error);
+static gint     gda_capi_recordset_fetch_nb_rows (GdaDataSelect *model);
+static gboolean gda_capi_recordset_fetch_random (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+static gboolean gda_capi_recordset_fetch_next (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+static gboolean gda_capi_recordset_fetch_prev (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
+static gboolean gda_capi_recordset_fetch_at (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error);
 
 
 struct _GdaCapiRecordsetPrivate {
@@ -69,7 +69,7 @@
 gda_capi_recordset_class_init (GdaCapiRecordsetClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GdaPModelClass *pmodel_class = GDA_PMODEL_CLASS (klass);
+	GdaDataSelectClass *pmodel_class = GDA_DATA_SELECT_CLASS (klass);
 
 	parent_class = g_type_class_peek_parent (klass);
 
@@ -126,7 +126,7 @@
 		};
 		g_static_mutex_lock (&registering);
 		if (type == 0)
-			type = g_type_register_static (GDA_TYPE_PMODEL, "GdaCapiRecordset", &info, 0);
+			type = g_type_register_static (GDA_TYPE_DATA_SELECT, "GdaCapiRecordset", &info, 0);
 		g_static_mutex_unlock (&registering);
 	}
 
@@ -221,7 +221,7 @@
  * Get the number of rows in @model, if possible
  */
 static gint
-gda_capi_recordset_fetch_nb_rows (GdaPModel *model)
+gda_capi_recordset_fetch_nb_rows (GdaDataSelect *model)
 {
 	GdaCapiRecordset *imodel;
 
@@ -245,13 +245,13 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row(). If new row objects are "given" to the GdaPModel implemantation
+ * can use gda_data_select_take_row(). If new row objects are "given" to the GdaDataSelect implemantation
  * using that method, then this method should detect when all the data model rows have been analysed
  * (when model->nb_stored_rows == model->advertized_nrows) and then possibly discard the API handle
  * as it won't be used anymore to fetch rows.
  */
 static gboolean 
-gda_capi_recordset_fetch_random (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_capi_recordset_fetch_random (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaCapiRecordset *imodel;
 
@@ -266,7 +266,7 @@
  * Create and "give" filled #GdaRow object for all the rows in the model
  */
 static gboolean
-gda_capi_recordset_store_all (GdaPModel *model, GError **error)
+gda_capi_recordset_store_all (GdaDataSelect *model, GError **error)
 {
 	GdaCapiRecordset *imodel;
 	gint i;
@@ -292,10 +292,10 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row().
+ * can use gda_data_select_take_row().
  */
 static gboolean 
-gda_capi_recordset_fetch_next (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_capi_recordset_fetch_next (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaCapiRecordset *imodel = (GdaCapiRecordset*) model;
 
@@ -314,10 +314,10 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row().
+ * can use gda_data_select_take_row().
  */
 static gboolean 
-gda_capi_recordset_fetch_prev (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_capi_recordset_fetch_prev (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaCapiRecordset *imodel = (GdaCapiRecordset*) model;
 
@@ -336,10 +336,10 @@
  *     but the function may return FALSE if an error occurred.
  *
  * Memory management for that new GdaRow object is left to the implementation, which
- * can use gda_pmodel_take_row().
+ * can use gda_data_select_take_row().
  */
 static gboolean 
-gda_capi_recordset_fetch_at (GdaPModel *model, GdaRow **prow, gint rownum, GError **error)
+gda_capi_recordset_fetch_at (GdaDataSelect *model, GdaRow **prow, gint rownum, GError **error)
 {
 	GdaCapiRecordset *imodel = (GdaCapiRecordset*) model;
 	

Modified: trunk/providers/skel-implementation/capi/gda-capi-recordset.h
==============================================================================
--- trunk/providers/skel-implementation/capi/gda-capi-recordset.h	(original)
+++ trunk/providers/skel-implementation/capi/gda-capi-recordset.h	Sat Aug 30 20:55:43 2008
@@ -24,7 +24,7 @@
 #define __GDA_CAPI_RECORDSET_H__
 
 #include <libgda/libgda.h>
-#include <providers-support/gda-pmodel.h>
+#include <providers-support/gda-data-select-priv.h>
 #include "gda-capi-pstmt.h"
 
 G_BEGIN_DECLS
@@ -40,12 +40,12 @@
 typedef struct _GdaCapiRecordsetPrivate GdaCapiRecordsetPrivate;
 
 struct _GdaCapiRecordset {
-	GdaPModel                model;
+	GdaDataSelect                model;
 	GdaCapiRecordsetPrivate *priv;
 };
 
 struct _GdaCapiRecordsetClass {
-	GdaPModelClass             parent_class;
+	GdaDataSelectClass             parent_class;
 };
 
 GType         gda_capi_recordset_get_type  (void) G_GNUC_CONST;

Modified: trunk/tests/data-models/check_pmodel.c
==============================================================================
--- trunk/tests/data-models/check_pmodel.c	(original)
+++ trunk/tests/data-models/check_pmodel.c	Sat Aug 30 20:55:43 2008
@@ -4,7 +4,6 @@
 #include <libgda/libgda.h>
 #include <sql-parser/gda-sql-parser.h>
 #include <sql-parser/gda-sql-statement.h>
-#include <providers-support/gda-pmodel.h>
 #include <tests/gda-ddl-creator.h>
 #include <glib/gstdio.h>
 #include "../test-cnc-utils.h"
@@ -204,7 +203,7 @@
 	GdaStatement *stmt;
 	gint nfailed = 0;
 
-	/* create GdaPModel */
+	/* create GdaDataSelect */
 	stmt = stmt_from_string ("SELECT * FROM customers");
 	model = gda_connection_statement_execute_select (cnc, stmt, NULL, &error);
 	if (!model) {
@@ -214,18 +213,18 @@
 #endif
 		goto out;
 	}
-	if (!GDA_IS_PMODEL (model)) {
-		g_print ("Data model should be a GdaPModel!\n");
+	if (!GDA_IS_DATA_SELECT (model)) {
+		g_print ("Data model should be a GdaDataSelect!\n");
 		exit (EXIT_FAILURE);
 	}
 
 	/* test non INSERT, UPDATE or DELETE stmts */
 	GdaStatement *mod_stmt;
 	
-	if (gda_pmodel_set_modification_statement (GDA_PMODEL (model), stmt, &error)) {
+	if (gda_data_select_set_modification_statement (GDA_DATA_SELECT (model), stmt, &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_modification_statement() should have failed\n");
+		g_print ("gda_data_select_set_modification_statement() should have failed\n");
 #endif
 		goto out;
 	}
@@ -236,10 +235,10 @@
 	error = NULL;
 
 	mod_stmt = stmt_from_string ("BEGIN");
-	if (gda_pmodel_set_modification_statement (GDA_PMODEL (model), mod_stmt, &error)) {
+	if (gda_data_select_set_modification_statement (GDA_DATA_SELECT (model), mod_stmt, &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_modification_statement() should have failed\n");
+		g_print ("gda_data_select_set_modification_statement() should have failed\n");
 #endif
 		goto out;
 	}
@@ -252,10 +251,10 @@
 
 	/* test INSERT with undefined params */
 	mod_stmt = stmt_from_string ("INSERT INTO customers (name) VALUES (##aname::string)");
-	if (gda_pmodel_set_modification_statement (GDA_PMODEL (model), mod_stmt, &error)) {
+	if (gda_data_select_set_modification_statement (GDA_DATA_SELECT (model), mod_stmt, &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_modification_statement() should have failed\n");
+		g_print ("gda_data_select_set_modification_statement() should have failed\n");
 #endif
 		goto out;
 	}
@@ -288,7 +287,7 @@
 
 	clear_signals ();
 
-	/* create GdaPModel */
+	/* create GdaDataSelect */
 	stmt = stmt_from_string ("SELECT * FROM customers WHERE country = ##country::string");
 	if (!gda_statement_get_parameters (stmt, &params, &error)) {
 		nfailed++;
@@ -307,18 +306,18 @@
 #endif
 		goto out;
 	}
-	if (!GDA_IS_PMODEL (model)) {
-		g_print ("Data model should be a GdaPModel!\n");
+	if (!GDA_IS_DATA_SELECT (model)) {
+		g_print ("Data model should be a GdaDataSelect!\n");
 		exit (EXIT_FAILURE);
 	}
 
 
 	/* test INSERT with params of the wrong type */
 	mod_stmt = stmt_from_string ("INSERT INTO customers (name, country) VALUES (##+1::string, ##country::date)");
-	if (gda_pmodel_set_modification_statement (GDA_PMODEL (model), mod_stmt, &error)) {
+	if (gda_data_select_set_modification_statement (GDA_DATA_SELECT (model), mod_stmt, &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_modification_statement() should have failed\n");
+		g_print ("gda_data_select_set_modification_statement() should have failed\n");
 #endif
 		goto out;
 	}
@@ -331,10 +330,10 @@
 
 	/* test correct INSERT */
 	mod_stmt = stmt_from_string ("INSERT INTO customers (name, country) VALUES (##+1::string, ##country::string)");
-	if (!gda_pmodel_set_modification_statement (GDA_PMODEL (model), mod_stmt, &error)) {
+	if (!gda_data_select_set_modification_statement (GDA_DATA_SELECT (model), mod_stmt, &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_modification_statement() should have succedded, error: %s\n",
+		g_print ("gda_data_select_set_modification_statement() should have succedded, error: %s\n",
 			 error && error->message ? error->message : "No detail");
 #endif
 		goto out;
@@ -363,7 +362,7 @@
 
 	clear_signals ();
 
-	/* create GdaPModel */
+	/* create GdaDataSelect */
 	stmt = stmt_from_string ("SELECT * FROM customers");
 	model = gda_connection_statement_execute_select (cnc, stmt, NULL, &error);
 	if (!model) {
@@ -373,17 +372,17 @@
 #endif
 		goto out;
 	}
-	if (!GDA_IS_PMODEL (model)) {
-		g_print ("Data model should be a GdaPModel!\n");
+	if (!GDA_IS_DATA_SELECT (model)) {
+		g_print ("Data model should be a GdaDataSelect!\n");
 		exit (EXIT_FAILURE);
 	}
 
 	/* test INSERT with undefined params */
 	mod_stmt = stmt_from_string ("UPDATE customers SET name = ##+1::string, last_update = ##+2::timestamp WHERE id = ##-0::gint");
-	if (!gda_pmodel_set_modification_statement (GDA_PMODEL (model), mod_stmt, &error)) {
+	if (!gda_data_select_set_modification_statement (GDA_DATA_SELECT (model), mod_stmt, &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_modification_statement() should have succedded, error: %s\n",
+		g_print ("gda_data_select_set_modification_statement() should have succedded, error: %s\n",
 			 error && error->message ? error->message : "No detail");
 #endif
 		goto out;
@@ -455,7 +454,7 @@
 
 	clear_signals ();
 
-	/* create GdaPModel */
+	/* create GdaDataSelect */
 	stmt = stmt_from_string ("SELECT * FROM customers");
 	model = gda_connection_statement_execute_select (cnc, stmt, NULL, &error);
 	if (!model) {
@@ -465,17 +464,17 @@
 #endif
 		goto out;
 	}
-	if (!GDA_IS_PMODEL (model)) {
-		g_print ("Data model should be a GdaPModel!\n");
+	if (!GDA_IS_DATA_SELECT (model)) {
+		g_print ("Data model should be a GdaDataSelect!\n");
 		exit (EXIT_FAILURE);
 	}
 
 	/* test INSERT with undefined params */
 	mod_stmt = stmt_from_string ("DELETE FROM customers WHERE id = ##-0::gint");
-	if (!gda_pmodel_set_modification_statement (GDA_PMODEL (model), mod_stmt, &error)) {
+	if (!gda_data_select_set_modification_statement (GDA_DATA_SELECT (model), mod_stmt, &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_modification_statement() should have succedded, error: %s\n",
+		g_print ("gda_data_select_set_modification_statement() should have succedded, error: %s\n",
 			 error && error->message ? error->message : "No detail");
 #endif
 		goto out;
@@ -520,7 +519,7 @@
 
 	clear_signals ();
 
-	/* create GdaPModel */
+	/* create GdaDataSelect */
 	stmt = stmt_from_string ("SELECT * FROM customers");
 	model = gda_connection_statement_execute_select (cnc, stmt, NULL, &error);
 	if (!model) {
@@ -530,17 +529,17 @@
 #endif
 		goto out;
 	}
-	if (!GDA_IS_PMODEL (model)) {
-		g_print ("Data model should be a GdaPModel!\n");
+	if (!GDA_IS_DATA_SELECT (model)) {
+		g_print ("Data model should be a GdaDataSelect!\n");
 		exit (EXIT_FAILURE);
 	}
 
 	/* test INSERT with undefined params */
 	mod_stmt = stmt_from_string ("UPDATE customers SET name = ##+1::string, last_update = ##+2::timestamp, default_served_by = ##+3::gint WHERE id = ##-0::gint");
-	if (!gda_pmodel_set_modification_statement (GDA_PMODEL (model), mod_stmt, &error)) {
+	if (!gda_data_select_set_modification_statement (GDA_DATA_SELECT (model), mod_stmt, &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_modification_statement() should have succedded, error: %s\n",
+		g_print ("gda_data_select_set_modification_statement() should have succedded, error: %s\n",
 			 error && error->message ? error->message : "No detail");
 #endif
 		goto out;
@@ -629,7 +628,7 @@
 
 	clear_signals ();
 
-	/* create GdaPModel */
+	/* create GdaDataSelect */
 	stmt = stmt_from_string ("SELECT * FROM customers");
 	model = gda_connection_statement_execute_select (cnc, stmt, NULL, &error);
 	if (!model) {
@@ -639,16 +638,16 @@
 #endif
 		goto out;
 	}
-	if (!GDA_IS_PMODEL (model)) {
-		g_print ("Data model should be a GdaPModel!\n");
+	if (!GDA_IS_DATA_SELECT (model)) {
+		g_print ("Data model should be a GdaDataSelect!\n");
 		exit (EXIT_FAILURE);
 	}
 
 	/* set unique row select */
-	if (gda_pmodel_set_row_selection_condition_sql (GDA_PMODEL (model), "id > ##-0::gint", &error)) {
+	if (gda_data_select_set_row_selection_condition_sql (GDA_DATA_SELECT (model), "id > ##-0::gint", &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_row_selection_condition_sql() should have failed\n");
+		g_print ("gda_data_select_set_row_selection_condition_sql() should have failed\n");
 #endif
 		goto out;
 	}
@@ -660,19 +659,19 @@
 		error = NULL;
 	}
 
-	if (! gda_pmodel_set_row_selection_condition_sql (GDA_PMODEL (model), "id = ##-0::gint", &error)) {
+	if (! gda_data_select_set_row_selection_condition_sql (GDA_DATA_SELECT (model), "id = ##-0::gint", &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_row_selection_condition_sql() have succedded, error: %s\n",
+		g_print ("gda_data_select_set_row_selection_condition_sql() have succedded, error: %s\n",
 			 error && error->message ? error->message : "No detail");
 #endif
 		goto out;
 	}
 
-	if (gda_pmodel_set_row_selection_condition_sql (GDA_PMODEL (model), "id = ##-0::gint", &error)) {
+	if (gda_data_select_set_row_selection_condition_sql (GDA_DATA_SELECT (model), "id = ##-0::gint", &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_row_selection_condition_sql() should have failed\n");
+		g_print ("gda_data_select_set_row_selection_condition_sql() should have failed\n");
 #endif
 		goto out;
 	}
@@ -686,10 +685,10 @@
 
 	/* set INSERT statement */
 	mod_stmt = stmt_from_string ("INSERT INTO customers (name, last_update, default_served_by) VALUES (##+1::string, CURRENT_TIMESTAMP, ##+3::gint)");
-	if (!gda_pmodel_set_modification_statement (GDA_PMODEL (model), mod_stmt, &error)) {
+	if (!gda_data_select_set_modification_statement (GDA_DATA_SELECT (model), mod_stmt, &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_set_modification_statement() should have succedded, error: %s\n",
+		g_print ("gda_data_select_set_modification_statement() should have succedded, error: %s\n",
 			 error && error->message ? error->message : "No detail");
 #endif
 		goto out;
@@ -792,7 +791,7 @@
 
 	clear_signals ();
 
-	/* create GdaPModel */
+	/* create GdaDataSelect */
 	stmt = stmt_from_string ("SELECT * FROM customers WHERE country = ##country::string");
 	if (!gda_statement_get_parameters (stmt, &params, &error)) {
 		nfailed++;
@@ -810,17 +809,17 @@
 #endif
 		goto out;
 	}
-	if (!GDA_IS_PMODEL (model)) {
-		g_print ("Data model should be a GdaPModel!\n");
+	if (!GDA_IS_DATA_SELECT (model)) {
+		g_print ("Data model should be a GdaDataSelect!\n");
 		exit (EXIT_FAILURE);
 	}
 
 	
-	/* gda_pmodel_compute_modification_statements() */
-	if (!gda_pmodel_compute_modification_statements (GDA_PMODEL (model), TRUE, &error)) {
+	/* gda_data_select_compute_modification_statements() */
+	if (!gda_data_select_compute_modification_statements (GDA_DATA_SELECT (model), TRUE, &error)) {
 		nfailed++;
 #ifdef CHECK_EXTRA_INFO
-		g_print ("gda_pmodel_compute_modification_statements() should have succedded, error: %s\n",
+		g_print ("gda_data_select_compute_modification_statements() should have succedded, error: %s\n",
 			 error && error->message ? error->message : "No detail");
 #endif
 		goto out;



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