[libgda/LIBGDA_4.2] Revert "Initial GdaDataPivot implementation"



commit aef62a62000b139b32c5a216a5d5dae32aa79c59
Author: Vivien Malerba <malerba gnome-db org>
Date:   Thu Sep 22 21:31:08 2011 +0200

    Revert "Initial GdaDataPivot implementation"
    
    This reverts commit 715f24c0922de81fe26ea64bc8b55fe15480aa11.

 doc/C/libgda-4.0-docs.sgml      |    2 -
 doc/C/libgda-sections.txt       |   22 -
 libgda/Makefile.am              |    6 +-
 libgda/gda-data-pivot.c         | 1629 ---------------------------------------
 libgda/gda-data-pivot.h         |  125 ---
 libgda/libgda.h.in              |    1 -
 libgda/libgda.symbols           |    5 -
 tests/data-models/.gitignore    |    1 -
 tests/data-models/Makefile.am   |   15 +-
 tests/data-models/check_pivot.c |  201 -----
 tests/data-models/pivot.db      |  Bin 3072 -> 0 bytes
 tools/gda-sql.1.in              |   25 -
 tools/gda-sql.c                 |  236 +-----
 13 files changed, 43 insertions(+), 2225 deletions(-)
---
diff --git a/doc/C/libgda-4.0-docs.sgml b/doc/C/libgda-4.0-docs.sgml
index 8baa7fc..556f314 100644
--- a/doc/C/libgda-4.0-docs.sgml
+++ b/doc/C/libgda-4.0-docs.sgml
@@ -58,7 +58,6 @@
 <!ENTITY libgda-GdaDataModel SYSTEM "xml/gda-data-model.xml">
 <!ENTITY libgda-GdaDataModelIter SYSTEM "xml/gda-data-model-iter.xml">
 <!ENTITY libgda-GdaDataModelImport SYSTEM "xml/gda-data-model-import.xml">
-<!ENTITY libgda-GdaDataPivot SYSTEM "xml/gda-data-pivot.xml">
 <!ENTITY libgda-GdaDataAccessWrapper SYSTEM "xml/gda-data-access-wrapper.xml">
 <!ENTITY libgda-GdaDataProxy SYSTEM "xml/gda-data-proxy.xml">
 <!ENTITY libgda-GdaConnection-event SYSTEM "xml/gda-connection-event.xml">
@@ -668,7 +667,6 @@
       &libgda-GdaColumn;
       &libgda-GdaDataModelIter;
       &libgda-GdaDataModelImport;
-      &libgda-GdaDataPivot;
       &libgda-GdaDataAccessWrapper;
       &libgda-GdaDataModelArray;
       &libgda-GdaRow;
diff --git a/doc/C/libgda-sections.txt b/doc/C/libgda-sections.txt
index 17cafaf..94976c4 100644
--- a/doc/C/libgda-sections.txt
+++ b/doc/C/libgda-sections.txt
@@ -337,28 +337,6 @@ gda_data_access_wrapper_get_type
 </SECTION>
 
 <SECTION>
-<FILE>gda-data-pivot</FILE>
-<TITLE>GdaDataPivot</TITLE>
-GdaDataPivot
-GdaDataPivotClass
-GdaDataPivotPrivate
-GdaDataPivotError
-gda_data_pivot_new
-GdaDataPivotFieldType
-gda_data_pivot_add_field
-GdaDataPivotAggregate
-gda_data_pivot_add_data
-gda_data_pivot_populate
-<SUBSECTION Standard>
-GDA_DATA_PIVOT
-GDA_DATA_PIVOT_CLASS
-GDA_IS_DATA_PIVOT
-GDA_IS_DATA_PIVOT_CLASS
-GDA_TYPE_DATA_PIVOT
-gda_data_pivot_get_type
-</SECTION>
-
-<SECTION>
 <FILE>gda-data-model</FILE>
 <TITLE>GdaDataModel</TITLE>
 GdaDataModel
diff --git a/libgda/Makefile.am b/libgda/Makefile.am
index b45f606..61760c6 100644
--- a/libgda/Makefile.am
+++ b/libgda/Makefile.am
@@ -104,8 +104,7 @@ gda_headers = \
 	gda-util.h \
 	gda-value.h \
 	gda-xa-transaction.h \
-	libgda-global-variables.h \
-	gda-data-pivot.h
+	libgda-global-variables.h
 
 gda_built_sources= \
 	$(builddir)/libgda.h
@@ -163,8 +162,7 @@ gda_sources= \
 	gda-tree-mgr-select.c \
 	gda-util.c \
 	gda-value.c \
-	gda-xa-transaction.c \
-	gda-data-pivot.c
+	gda-xa-transaction.c 
 
 libgda_sources =  \
 	csv.h \
diff --git a/libgda/libgda.h.in b/libgda/libgda.h.in
index b1df44d..d6d8be9 100644
--- a/libgda/libgda.h.in
+++ b/libgda/libgda.h.in
@@ -48,7 +48,6 @@
 #include <libgda/gda-data-access-wrapper.h>
 #include <libgda/gda-data-proxy.h>
 #include <libgda/gda-data-select.h>
-#include <libgda/gda-data-pivot.h>
 #include <libgda/gda-lockable.h>
 #include <libgda/gda-log.h>
 #include <libgda/gda-quark-list.h>
diff --git a/libgda/libgda.symbols b/libgda/libgda.symbols
index d9d4cbe..24347a5 100644
--- a/libgda/libgda.symbols
+++ b/libgda/libgda.symbols
@@ -286,11 +286,6 @@
 	gda_data_model_set_value_at
 	gda_data_model_set_values
 	gda_data_model_thaw
-	gda_data_pivot_add_data
-	gda_data_pivot_add_field
-	gda_data_pivot_get_type
-	gda_data_pivot_new
-	gda_data_pivot_populate
 	gda_data_proxy_alter_value_attributes
 	gda_data_proxy_apply_all_changes
 	gda_data_proxy_apply_row_changes
diff --git a/tests/data-models/.gitignore b/tests/data-models/.gitignore
index 26ad01b..1629cb3 100644
--- a/tests/data-models/.gitignore
+++ b/tests/data-models/.gitignore
@@ -6,5 +6,4 @@ check_pmodel
 check_empty_rs
 check_model_errors
 check_vcnc
-check_pivot
 *.db
diff --git a/tests/data-models/Makefile.am b/tests/data-models/Makefile.am
index 22cc923..2b1608c 100644
--- a/tests/data-models/Makefile.am
+++ b/tests/data-models/Makefile.am
@@ -4,12 +4,11 @@ AM_CPPFLAGS = \
 	-I$(top_builddir) \
 	$(LIBGDA_CFLAGS) \
 	$(LIBGDA_WFLAGS) \
-	-DCHECK_FILES=\""$(top_srcdir)"\" \
-	-DROOT_DIR=\""$(top_srcdir)"\"
+	-DCHECK_FILES=\""$(top_srcdir)"\"
 
 TESTS_ENVIRONMENT = GDA_TOP_SRC_DIR="$(abs_top_srcdir)" GDA_TOP_BUILD_DIR="$(abs_top_builddir)"
-check_PROGRAMS = check_model_import check_virtual check_data_proxy check_model_copy check_pmodel check_empty_rs check_model_errors check_vcnc check_pivot
-TESTS = check_model_import check_virtual check_data_proxy check_model_copy check_pmodel check_empty_rs check_model_errors check_vcnc check_pivot
+check_PROGRAMS = check_model_import check_virtual check_data_proxy check_model_copy check_pmodel check_empty_rs check_model_errors check_vcnc
+TESTS = check_model_import check_virtual check_data_proxy check_model_copy check_pmodel check_empty_rs check_model_errors check_vcnc
 
 common_sources = 
 
@@ -65,14 +64,6 @@ check_vcnc_LDADD = \
 	$(top_builddir)/libgda/libgda-4.0.la \
 	$(LIBGDA_LIBS)
 
-check_pivot_SOURCES = $(common_sources) check_pivot.c
-check_pivot_CFLAGS = \
-	-I$(top_srcdir)/libgda/sqlite \
-	-I$(top_srcdir)/libgda/sqlite/pivot
-check_pivot_LDADD = \
-	$(top_builddir)/libgda/libgda-5.0.la \
-	$(COREDEPS_LIBS)
-
 
 EXTRA_DIST = \
 	check_virtual.csv \
diff --git a/tools/gda-sql.1.in b/tools/gda-sql.1.in
index 2a6c2e3..e18619b 100644
--- a/tools/gda-sql.1.in
+++ b/tools/gda-sql.1.in
@@ -270,31 +270,6 @@ Updates the current connection's meta data (use this command after having modifi
 database's schema).
 .IP \fB.o\fP
 Sends output to a file or |pipe. Full syntax is: \fB.o <FILE_NAME>\fP or \fB.o |<COMMAND>\fP.
-.IP \fB.pivot\fP
-Performs data summarization on a data set. Full syntax is: \fB.pivot <SELECT> <ROW_FIELDS> <COLUMN_FIELDS> [<DATA_FIELDS> [...]]\fP.
-
-The \fI<SELECT>\fP defines the data set to perform summarization on.
-
-The \fI<ROW_FIELDS>\fP defines the fields from the data set from which each individual value will
-yield to a row in the analysis (it can be any valid selectable SQL expression on the data set's
-fields); multiple expressions can be provided, separated by commas (forming a valid SQL expression).
-
-The \fI<COLUMN_FIELDS>\fP defines the fields from the data set from which each individual value will
-yield to a column in the analysis. Its syntax is similar to the \fI<ROW_FIELDS>\fP one.
-
-The \fI<DATA_FIELDS>\fP arguments are entirely optional and indicates the way data summarization
-is done for each pair of (row,column) values (the default is to count occurrences). The syntax
-for each \fI<DATA_FIELDS>\fP argument is: \fB[aggregate]<SQL_expression>\fP, where the aggregate
-part is optional and, if present must be among [SUM], [COUNT], [AVG], [MIN] or [MAX], and
-the SQL expression is a valid selectable SQL expression of the data set's fields.
-
-Examples:
-
-\fB.pivot "SELECT * FROM food" person food\fP
-
-\fB.pivot "SELECT * FROM products" category "CASE WHEN price < 15 THEN 'low' ELSE 'high' END" [AVG]price \fP
-
-
 .IP \fB.q\fP
 Quits the application.
 .IP \fB.qecho\fP
diff --git a/tools/gda-sql.c b/tools/gda-sql.c
index 82337ee..34462f5 100644
--- a/tools/gda-sql.c
+++ b/tools/gda-sql.c
@@ -154,8 +154,7 @@ static const char *prompt_func (void);
 static GdaInternalCommandsList  *build_internal_commands_list (void);
 static gboolean                  command_is_complete (const gchar *command);
 static GdaInternalCommandResult *command_execute (SqlConsole *console,
-						  const gchar *command,
-						  GdaStatementModelUsage usage, GError **error);
+						  const gchar *command, GError **error);
 
 static gchar                    *result_to_string (SqlConsole *console, GdaInternalCommandResult *res);
 static void                      display_result (GdaInternalCommandResult *res);
@@ -493,8 +492,7 @@ treat_line_func (const gchar *cmde, gboolean *out_cmde_exec_ok)
 				to_stream = main_data->output_stream;
 			else
 				to_stream = stdout;
-			res = command_execute (NULL, main_data->partial_command->str,
-					       GDA_STATEMENT_MODEL_RANDOM_ACCESS, &error);
+			res = command_execute (NULL, main_data->partial_command->str, &error);
 			
 			if (!res) {
 				if (!error ||
@@ -863,13 +861,10 @@ command_is_complete (const gchar *command)
  * command_execute
  */
 static GdaInternalCommandResult *execute_internal_command (SqlConsole *console, GdaConnection *cnc,
-							   const gchar *command_str,
-							   GError **error);
-static GdaInternalCommandResult *execute_external_command (SqlConsole *console, const gchar *command,
-							   GdaStatementModelUsage usage,
-							   GError **error);
+							   const gchar *command_str, GError **error);
+static GdaInternalCommandResult *execute_external_command (SqlConsole *console, const gchar *command, GError **error);
 static GdaInternalCommandResult *
-command_execute (SqlConsole *console, const gchar *command, GdaStatementModelUsage usage, GError **error)
+command_execute (SqlConsole *console, const gchar *command, GError **error)
 {
 	ConnectionSetting *cs;
 
@@ -901,7 +896,7 @@ command_execute (SqlConsole *console, const gchar *command, GdaStatementModelUsa
                         return NULL;
                 }
 
-                return execute_external_command (console, command, usage, error);
+                return execute_external_command (console, command, error);
         }
 }
 
@@ -1063,8 +1058,7 @@ execute_internal_command (SqlConsole *console, GdaConnection *cnc, const gchar *
  * Executes an SQL statement as understood by the DBMS
  */
 static GdaInternalCommandResult *
-execute_external_command (SqlConsole *console, const gchar *command,
-			  GdaStatementModelUsage usage, GError **error)
+execute_external_command (SqlConsole *console, const gchar *command, GError **error)
 {
 	GdaInternalCommandResult *res = NULL;
 	GdaBatch *batch;
@@ -1174,7 +1168,8 @@ execute_external_command (SqlConsole *console, const gchar *command,
 	res = g_new0 (GdaInternalCommandResult, 1);
 	res->was_in_transaction_before_exec = gda_connection_get_transaction_status (cs->cnc) ? TRUE : FALSE;
 	res->cnc = g_object_ref (cs->cnc);
-	obj = gda_connection_statement_execute (cs->cnc, stmt, params, usage, NULL, error);
+	obj = gda_connection_statement_execute (cs->cnc, stmt, params, 
+						GDA_STATEMENT_MODEL_RANDOM_ACCESS, NULL, error);
 	if (!obj) {
 		g_free (res);
 		res = NULL;
@@ -1880,7 +1875,7 @@ data_model_to_string (SqlConsole *console, GdaDataModel *model)
 			gchar *tmp2, *tmp3;
 			gdouble etime;
 			g_object_get ((GObject*) model, "execution-delay", &etime, NULL);
-			tmp2 = g_strdup_printf ("%s: %.03f s", _("Execution delay"), etime);
+			tmp2 = g_strdup_printf (_("Execution delay: %.03f"), etime);
 			tmp3 = g_strdup_printf ("%s\n%s", tmp, tmp2);
 			g_free (tmp);
 			g_free (tmp2);
@@ -2132,9 +2127,6 @@ static GdaInternalCommandResult *extra_command_export (SqlConsole *console, GdaC
 static GdaInternalCommandResult *extra_command_set2 (SqlConsole *console, GdaConnection *cnc,
 						     const gchar **args,
 						     GError **error, gpointer data);
-static GdaInternalCommandResult *extra_command_pivot (SqlConsole *console, GdaConnection *cnc,
-						      const gchar **args,
-						      GError **error, gpointer data);
 
 static GdaInternalCommandResult *extra_command_declare_fk (SqlConsole *console, GdaConnection *cnc,
 							   const gchar **args,
@@ -2550,6 +2542,30 @@ build_internal_commands_list (void)
 	commands->commands = g_slist_prepend (commands->commands, c);
 
 	c = g_new0 (GdaInternalCommand, 1);
+	c->group = _("Query buffer");
+	c->name = g_strdup_printf (_("%s [NAME [VALUE|_null_]]"), "set");
+	c->description = _("Set or show internal parameter, or list all if no parameters");
+	c->args = NULL;
+	c->command_func = (GdaInternalCommandFunc) extra_command_set;
+	c->user_data = NULL;
+	c->arguments_delimiter_func = args_as_string_set;
+	c->unquote_args = TRUE;
+	c->limit_to_main = FALSE;
+	commands->commands = g_slist_prepend (commands->commands, c);
+
+	c = g_new0 (GdaInternalCommand, 1);
+	c->group = _("Query buffer");
+	c->name = g_strdup_printf (_("%s [NAME]"), "unset");
+	c->description = _("Unset (delete) internal named parameter (or all parameters)");
+	c->args = NULL;
+	c->command_func = (GdaInternalCommandFunc) extra_command_unset;
+	c->user_data = NULL;
+	c->arguments_delimiter_func = NULL;
+	c->unquote_args = TRUE;
+	c->limit_to_main = FALSE;
+	commands->commands = g_slist_prepend (commands->commands, c);
+
+	c = g_new0 (GdaInternalCommand, 1);
 	c->group = _("Formatting");
 	c->name = "H [HTML|XML|CSV|DEFAULT]";
 	c->description = _("Set output format");
@@ -2587,31 +2603,7 @@ build_internal_commands_list (void)
 	commands->commands = g_slist_prepend (commands->commands, c);
 
 	c = g_new0 (GdaInternalCommand, 1);
-	c->group = _("Execution context");
-	c->name = g_strdup_printf (_("%s [NAME [VALUE|_null_]]"), "set");
-	c->description = _("Set or show internal parameter, or list all if no parameters");
-	c->args = NULL;
-	c->command_func = (GdaInternalCommandFunc) extra_command_set;
-	c->user_data = NULL;
-	c->arguments_delimiter_func = args_as_string_set;
-	c->unquote_args = TRUE;
-	c->limit_to_main = FALSE;
-	commands->commands = g_slist_prepend (commands->commands, c);
-
-	c = g_new0 (GdaInternalCommand, 1);
-	c->group = _("Execution context");
-	c->name = g_strdup_printf (_("%s [NAME]"), "unset");
-	c->description = _("Unset (delete) internal named parameter (or all parameters)");
-	c->args = NULL;
-	c->command_func = (GdaInternalCommandFunc) extra_command_unset;
-	c->user_data = NULL;
-	c->arguments_delimiter_func = NULL;
-	c->unquote_args = TRUE;
-	c->limit_to_main = FALSE;
-	commands->commands = g_slist_prepend (commands->commands, c);
-
-	c = g_new0 (GdaInternalCommand, 1);
-	c->group = _("Execution context");
+	c->group = _("Query buffer");
 	c->name = g_strdup_printf (_("%s NAME [FILE|TABLE COLUMN ROW_CONDITION]"), "setex");
 	c->description = _("Set internal parameter as the contents of the FILE file or from an existing table's value");
 	c->args = NULL;
@@ -2622,19 +2614,6 @@ build_internal_commands_list (void)
 	c->limit_to_main = TRUE;
 	commands->commands = g_slist_prepend (commands->commands, c);
 
-	c = g_new0 (GdaInternalCommand, 1);
-	c->group = _("Execution context");
-	c->name = g_strdup_printf (_("%s SELECT ROW_FIELDS COLUMN_FIELDS [DATA_FIELDS]"), "pivot");
-	c->description = _("Performs a statistical analysis on the data from SELECT, "
-			   "using ROW_FIELDS and COLUMN_FIELDS criteria and optionally DATA_FIELDS for the data");
-	c->args = NULL;
-	c->command_func = (GdaInternalCommandFunc) extra_command_pivot;
-	c->user_data = NULL;
-	c->arguments_delimiter_func = NULL;
-	c->unquote_args = TRUE;
-	c->limit_to_main = TRUE;
-	commands->commands = g_slist_prepend (commands->commands, c);
-
 	/* comes last */
 	c = g_new0 (GdaInternalCommand, 1);
 	c->group = _("General");
@@ -3695,8 +3674,7 @@ extra_command_exec_buffer (SqlConsole *console, GdaConnection *cnc, const gchar
 	if (!main_data->current->query_buffer) 
 		main_data->current->query_buffer = g_string_new ("");
 	if (*main_data->current->query_buffer->str != 0)
-		res = command_execute (NULL, main_data->current->query_buffer->str,
-				       GDA_STATEMENT_MODEL_RANDOM_ACCESS, error);
+		res = command_execute (NULL, main_data->current->query_buffer->str, error);
 	else {
 		res = g_new0 (GdaInternalCommandResult, 1);
 		res->type = GDA_INTERNAL_COMMAND_RESULT_EMPTY;
@@ -4521,7 +4499,7 @@ get_table_value_at_cell (GdaConnection *cnc, GError **error, G_GNUC_UNUSED MainD
 
 	/* execute statement */
 	GdaInternalCommandResult *tmpres;
-	tmpres = execute_external_command (NULL, sql, GDA_STATEMENT_MODEL_RANDOM_ACCESS, error);
+	tmpres = execute_external_command (NULL, sql, error);
 	g_free (sql);
 	if (!tmpres)
 		return NULL;
@@ -4636,143 +4614,6 @@ extra_command_set2 (SqlConsole *console, GdaConnection *cnc, const gchar **args,
 }
 
 static GdaInternalCommandResult *
-extra_command_pivot (SqlConsole *console, GdaConnection *cnc, const gchar **args,
-		     GError **error, gpointer data)
-{
-	GdaInternalCommandResult *res = NULL;
-	ConnectionSetting *cs;
-	cs = get_current_connection_settings (console);
-	if (!cs) {
-		g_set_error (error, 0, 0, "%s", 
-			     _("No connection specified"));
-		return NULL;
-	}
-
-	const gchar *select = NULL;
-	const gchar *row_fields = NULL;
-	const gchar *column_fields = NULL;
-
-        if (args[0] && *args[0]) {
-                select = args[0];
-                if (args[1] && *args[1]) {
-			row_fields = args [1];
-			if (args[2] && *args[2])
-				column_fields = args[2];
-		}
-        }
-
-	if (!select) {
-		g_set_error (error, 0, 0, "%s", 
-			     _("Missing data on which to operate"));
-		return NULL;
-	}
-	if (!row_fields) {
-		g_set_error (error, 0, 0, "%s", 
-			     _("Missing row fields specifications"));
-		return NULL;
-	}
-	if (!column_fields) {
-		g_set_error (error, 0, 0, "%s", 
-			     _("Missing column fields specifications"));
-		return NULL;
-	}
-
-	/* execute SELECT */
-	gboolean was_in_trans;
-	GdaInternalCommandResult *tmpres;
-
-	was_in_trans = gda_connection_get_transaction_status (cs->cnc) ? TRUE : FALSE;
-
-	tmpres = command_execute (console, select, GDA_STATEMENT_MODEL_CURSOR_FORWARD, error);
-	if (!tmpres)
-		return NULL;
-	if (tmpres->type != GDA_INTERNAL_COMMAND_RESULT_DATA_MODEL) {
-		gda_internal_command_exec_result_free (tmpres);
-		g_set_error (error, 0, 0, "%s", 
-			     _("Wrong SELECT argument"));
-		return NULL;
-	}
-
-	GdaDataPivot *pivot;
-	gdouble etime = 0.;
-	//g_object_get ((GObject*) tmpres->u.model, "execution-delay", &etime, NULL);
-	pivot = (GdaDataPivot*) gda_data_pivot_new (tmpres->u.model);
-	gda_internal_command_exec_result_free (tmpres);
-
-	if (! gda_data_pivot_add_field (pivot, GDA_DATA_PIVOT_FIELD_ROW,
-					row_fields, NULL, error)) {
-		g_object_unref (pivot);
-		return NULL;
-	}
-
-	if (! gda_data_pivot_add_field (pivot, GDA_DATA_PIVOT_FIELD_COLUMN,
-					column_fields, NULL, error)) {
-		g_object_unref (pivot);
-		return NULL;
-	}
-
-	GTimer *timer;
-	timer = g_timer_new ();
-
-	gint i;
-	for (i = 3; args[i] && *args[i]; i++) {
-		const gchar *df = args[i];
-		GdaDataPivotAggregate agg = GDA_DATA_PIVOT_COUNT;
-		if (*df == '[') {
-			const gchar *tmp;
-			for (tmp = df; *tmp && *tmp != ']'; tmp++);
-			if (!*tmp) {
-				g_timer_destroy (timer);
-				g_object_unref (pivot);
-				g_set_error (error, 0, 0, "%s", 
-					     _("Wrong data field argument"));
-				return NULL;
-			}
-			df++;
-			if (! g_ascii_strncasecmp (df, "sum", 3) && (df[3] == ']'))
-				agg = GDA_DATA_PIVOT_SUM;
-			else if (! g_ascii_strncasecmp (df, "avg", 3) && (df[3] == ']'))
-				agg = GDA_DATA_PIVOT_AVG;
-			else if (! g_ascii_strncasecmp (df, "max", 3) && (df[3] == ']'))
-				agg = GDA_DATA_PIVOT_MAX;
-			else if (! g_ascii_strncasecmp (df, "min", 3) && (df[3] == ']'))
-				agg = GDA_DATA_PIVOT_MIN;
-			else if (! g_ascii_strncasecmp (df, "count", 5) && (df[5] == ']'))
-				agg = GDA_DATA_PIVOT_COUNT;
-			else {
-				g_timer_destroy (timer);
-				g_object_unref (pivot);
-				g_set_error (error, 0, 0, "%s", 
-					     _("Wrong data field argument"));
-				return NULL;
-			}
-			df = tmp+1;
-		}
-		if (! gda_data_pivot_add_data (pivot, agg, df, NULL, error)) {
-			g_timer_destroy (timer);
-			g_object_unref (pivot);
-			return NULL;
-		}
-	}
-
-	if (! gda_data_pivot_populate (pivot, error)) {
-		g_timer_destroy (timer);
-		g_object_unref (pivot);
-		return NULL;
-	}
-
-	etime += g_timer_elapsed (timer, NULL);
-	g_timer_destroy (timer);
-	//g_object_set (pivot, "execution-delay", etime, NULL);
-
-	res = g_new0 (GdaInternalCommandResult, 1);
-	res->type = GDA_INTERNAL_COMMAND_RESULT_DATA_MODEL;
-	res->was_in_transaction_before_exec = was_in_trans;
-	res->u.model = (GdaDataModel*) pivot;
-	return res;
-}
-
-static GdaInternalCommandResult *
 extra_command_export (SqlConsole *console, GdaConnection *cnc, const gchar **args,
 		      GError **error, gpointer data)
 {
@@ -5292,8 +5133,7 @@ gda_sql_console_execute (SqlConsole *console, const gchar *command, GError **err
 			/* execute command */
 			GdaInternalCommandResult *res;
 			
-			res = command_execute (console, loc_cmde,
-					       GDA_STATEMENT_MODEL_RANDOM_ACCESS, error);
+			res = command_execute (console, loc_cmde, error);
 			
 			if (res) {
 				OutputFormat of = console->output_format;



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