gnomemm r2005 - in libgdamm/trunk: . libgda/src
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r2005 - in libgdamm/trunk: . libgda/src
- Date: Wed, 21 Jan 2009 22:58:01 +0000 (UTC)
Author: jhs
Date: Wed Jan 21 22:58:01 2009
New Revision: 2005
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2005&view=rev
Log:
2009-01-21 Johannes Schmid <jschmid openismus com>
* libgda/src/connection.ccg:
* libgda/src/connection.hg:
Created version with last_inserted_row of statement_execute_non_select()
* libgda/src/statement.ccg:
Take a copy of the GdaSet in get_parameters() because we get a reference
problem otherwise
Modified:
libgdamm/trunk/ChangeLog
libgdamm/trunk/libgda/src/connection.ccg
libgdamm/trunk/libgda/src/connection.hg
libgdamm/trunk/libgda/src/statement.ccg
Modified: libgdamm/trunk/libgda/src/connection.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/connection.ccg (original)
+++ libgdamm/trunk/libgda/src/connection.ccg Wed Jan 21 22:58:01 2009
@@ -183,6 +183,26 @@
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
+int Connection::statement_execute_non_select(const Glib::RefPtr<Statement>& cmd, const Glib::RefPtr<Set>& params)
+#else
+int Connection::statement_execute_non_select(const Glib::RefPtr<Statement>& cmd, const Glib::RefPtr<Set>& params, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ GError* gerror = 0;
+ const int retval = gda_connection_statement_execute_non_select(gobj(), Glib::unwrap(cmd), Glib::unwrap(params), 0, &gerror);
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+ if(gerror)
+ ::Glib::Error::throw_exception(gerror);
+#else
+ if(gerror)
+ error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+ return retval;
+}
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
int Connection::statement_execute_non_select(const Glib::RefPtr<Statement>& cmd)
#else
int Connection::statement_execute_non_select(const Glib::RefPtr<Statement>& cmd, std::auto_ptr<Glib::Error>& error)
Modified: libgdamm/trunk/libgda/src/connection.hg
==============================================================================
--- libgdamm/trunk/libgda/src/connection.hg (original)
+++ libgdamm/trunk/libgda/src/connection.hg Wed Jan 21 22:58:01 2009
@@ -151,11 +151,17 @@
#endif //GLIBMM_EXCEPTIONS_ENABLED
#ifdef GLIBMM_EXCEPTIONS_ENABLED
+ int statement_execute_non_select(const Glib::RefPtr<Statement>& stmt, const Glib::RefPtr<Set>& params);
+#else
+ int statement_execute_non_select(const Glib::RefPtr<Statement>& stmt, const Glib::RefPtr<Set>& params, std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
int statement_execute_non_select(const Glib::RefPtr<Statement>& stmt);
#else
int statement_execute_non_select(const Glib::RefPtr<Statement>& stmt, std::auto_ptr<Glib::Error>& error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
-
+
_WRAP_METHOD(int statement_execute_non_select(const Glib::ustring& sql), gda_execute_non_select_command, errthrow)
//Note that we do not add a non-const version of this because the documentation says that it should not be modified:
Modified: libgdamm/trunk/libgda/src/statement.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/statement.ccg (original)
+++ libgdamm/trunk/libgda/src/statement.ccg Wed Jan 21 22:58:01 2009
@@ -49,7 +49,7 @@
#endif //GLIBMM_EXCEPTIONS_ENABLED
if (set)
{
- params = Glib::wrap(set);
+ params = Glib::wrap(set, true);
}
return retval;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]