[libgda] GdaDataSelect: allow auto computation of INSERT independently of UPDATE and DELETE
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] GdaDataSelect: allow auto computation of INSERT independently of UPDATE and DELETE
- Date: Tue, 1 Feb 2011 21:39:38 +0000 (UTC)
commit 3c521825e3072fd965bf307d6d1cb0fb26678bc5
Author: Vivien Malerba <malerba gnome-db org>
Date: Tue Feb 1 21:27:24 2011 +0100
GdaDataSelect: allow auto computation of INSERT independently of UPDATE and DELETE
libgda/gda-data-select.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/libgda/gda-data-select.c b/libgda/gda-data-select.c
index dc5d513..1a38626 100644
--- a/libgda/gda-data-select.c
+++ b/libgda/gda-data-select.c
@@ -1,4 +1,4 @@
-/* GDA library
+/*
* Copyright (C) 2008 - 2011 The GNOME Foundation.
*
* AUTHORS:
@@ -1302,8 +1302,7 @@ gda_data_select_set_modification_statement (GdaDataSelect *model, GdaStatement *
* 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_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
+ * Returns: %TRUE if no error occurred. If %FALSE is returned, then some modification statement may still have been computed
*/
gboolean
gda_data_select_compute_modification_statements (GdaDataSelect *model, GError **error)
@@ -1332,8 +1331,11 @@ gda_data_select_compute_modification_statements (GdaDataSelect *model, GError **
retval = gda_compute_dml_statements (model->priv->cnc, stmt, TRUE,
&(modif_stmts[INS_QUERY]),
+ NULL, NULL, error);
+ retval = gda_compute_dml_statements (model->priv->cnc, stmt, TRUE,
+ NULL,
&(modif_stmts[UPD_QUERY]),
- &(modif_stmts[DEL_QUERY]), error);
+ &(modif_stmts[DEL_QUERY]), error) && retval;
for (mtype = FIRST_QUERY; mtype < NB_QUERIES; mtype++) {
#ifdef GDA_DEBUG_NO
if (modif_stmts[mtype]) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]