gnomemm r1532 - in libgdamm/branches/libgdamm-4-0: libgda/src tools/m4
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1532 - in libgdamm/branches/libgdamm-4-0: libgda/src tools/m4
- Date: Mon, 26 May 2008 10:21:01 +0000 (UTC)
Author: jhs
Date: Mon May 26 10:21:01 2008
New Revision: 1532
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1532&view=rev
Log:
2008-05-26 Johannes Schmid <johannes schmid openismus com>
* libgda/src/Makefile_list_of_hg.am_fragment:
* libgda/src/column.hg:
* libgda/src/command.ccg:
* libgda/src/command.hg:
* libgda/src/connection.ccg:
* libgda/src/connection.hg:
* libgda/src/datamodel.hg:
* libgda/src/datamodeliter.hg:
* libgda/src/datamodelquery.hg:
* libgda/src/dataproxy.hg:
* libgda/src/row.hg:
* libgda/src/set.hg:
* libgda/src/set.ccg:
* libgda/src/serverprovider.ccg:
* libgda/src/serverprovider.hg:
* tools/m4/convert_libgdamm.m4:
Updated several classes to libgda-4.0
Added:
libgdamm/branches/libgdamm-4-0/libgda/src/column.ccg
- copied unchanged from r1531, /libgdamm/trunk/libgda/src/column.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/column.hg
- copied, changed from r1531, /libgdamm/trunk/libgda/src/column.hg
libgdamm/branches/libgdamm-4-0/libgda/src/row.ccg
- copied unchanged from r1531, /libgdamm/trunk/libgda/src/row.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/row.hg
- copied, changed from r1531, /libgdamm/trunk/libgda/src/row.hg
libgdamm/branches/libgdamm-4-0/libgda/src/set.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/set.hg
Removed:
libgdamm/branches/libgdamm-4-0/libgda/src/command.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/command.hg
Modified:
libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment
libgdamm/branches/libgdamm-4-0/libgda/src/connection.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg
libgdamm/branches/libgdamm-4-0/libgda/src/datamodel.hg
libgdamm/branches/libgdamm-4-0/libgda/src/datamodeliter.hg
libgdamm/branches/libgdamm-4-0/libgda/src/datamodelquery.hg
libgdamm/branches/libgdamm-4-0/libgda/src/dataproxy.hg
libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.hg
libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment Mon May 26 10:21:01 2008
@@ -3,13 +3,14 @@
# so it's like copy-and-pasting this into each of those Makefile.am files.
files_hg = connection.hg connectionevent.hg \
- datahandler.hg datamodel.hg datamodelarray.hg datamodelfiltersql.hg \
- datamodelhash.hg datamodelimport.hg \
+ datahandler.hg datamodel.hg datamodelarray.hg \
+ datamodelimport.hg \
datamodeliter.hg datamodelquery.hg \
dataproxy.hg \
handlerstring.hg handlerboolean.hg handlertime.hg \
handlernumerical.hg handlerbin.hg handlertype.hg \
- serverprovider.hg serveroperation.hg transactionstatus.hg
+ serverprovider.hg serveroperation.hg transactionstatus.hg \
+ set.hg row.hg column.hg
Copied: libgdamm/branches/libgdamm-4-0/libgda/src/column.hg (from r1531, /libgdamm/trunk/libgda/src/column.hg)
==============================================================================
--- /libgdamm/trunk/libgda/src/column.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/column.hg Mon May 26 10:21:01 2008
@@ -89,6 +89,8 @@
#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
_WRAP_SIGNAL(void name_changed(const Glib::ustring& old_name), "name-changed")
+#m4 _CONVERSION(`gint', `GType', ($3)($2))
+#m4 _CONVERSION(`GType', `gint', ($3)($2))
_WRAP_SIGNAL(void g_type_changed(GType old_type, GType new_type), "g-type-changed")
_WRAP_PROPERTY("id", Glib::ustring)
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/connection.ccg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/connection.ccg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/connection.ccg Mon May 26 10:21:01 2008
@@ -45,39 +45,6 @@
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
-Glib::RefPtr<DataModel> Connection::get_schema(ConnectionSchema schema)
-#else
-Glib::RefPtr<DataModel> Connection::get_schema(ConnectionSchema schema, std::auto_ptr<Glib::Error>& error)
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-{
- GError *gerror = 0;
- Glib::RefPtr<DataModel> retval = Glib::wrap(gda_connection_get_schema(gobj(), ((GdaConnectionSchema)(schema)), 0, &gerror));
- if(retval)
- retval->reference();
-
-#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
-Glib::RefPtr<const DataModel> Connection::get_schema(ConnectionSchema schema) const
-#else
-Glib::RefPtr<const DataModel> Connection::get_schema(ConnectionSchema schema, std::auto_ptr<Glib::Error>& error) const
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- return const_cast<Connection*>(this)->get_schema(schema);
-#else
- return const_cast<Connection*>(this)->get_schema(schema, error);
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-}
-
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<DataModel> Connection::execute_select_command(const Command& cmd)
#else
Glib::RefPtr<DataModel> Connection::execute_select_command(const Command& cmd, std::auto_ptr<Glib::Error>& error)
@@ -95,107 +62,6 @@
return retvalue;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
-Glib::RefPtr<DataModel> Connection::execute_select_command(const Glib::ustring& cmd)
-#else
-Glib::RefPtr<DataModel> Connection::execute_select_command(const Glib::ustring& cmd, std::auto_ptr<Glib::Error>& error)
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-{
- Command command(cmd);
-
- GError *gerror = 0;
- Glib::RefPtr<DataModel> retvalue = Glib::wrap(gda_connection_execute_select_command(gobj(), const_cast<GdaCommand*>((command).gobj()), 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 retvalue;
-}
-
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
-Glib::RefPtr<DataModel> Connection::execute_select_command(const Glib::ustring& cmd, const Glib::RefPtr<ParameterList>& params)
-#else
-Glib::RefPtr<DataModel> Connection::execute_select_command(const Glib::ustring& cmd, const Glib::RefPtr<ParameterList>& params, std::auto_ptr<Glib::Error>& error)
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-{
- Command command(cmd);
-
- GError *gerror = 0;
- Glib::RefPtr<DataModel> retvalue = Glib::wrap(gda_connection_execute_select_command(gobj(), const_cast<GdaCommand*>((command).gobj()), Glib::unwrap(params), &(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 retvalue;
-}
-
-
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
-int Connection::execute_non_select_command(const Command& cmd)
-#else
-int Connection::execute_non_select_command(const Command& cmd, std::auto_ptr<Glib::Error>& error)
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-{
- GError *gerror = 0;
-
- int retvalue = gda_connection_execute_non_select_command(gobj(), const_cast<GdaCommand*>((cmd).gobj()), 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 retvalue;
-}
-
-
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
-int Connection::execute_non_select_command(const Glib::ustring& cmd)
-#else
-int Connection::execute_non_select_command(const Glib::ustring& cmd, std::auto_ptr<Glib::Error>& error)
-#endif
-{
- Command command(cmd);
-
- GError *gerror = 0;
- const int retvalue = gda_connection_execute_non_select_command(gobj(), const_cast<GdaCommand*>(command.gobj()), 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 retvalue;
-}
-
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
-int Connection::execute_non_select_command(const Glib::ustring& cmd, const Glib::RefPtr<ParameterList>& params)
-#else
-int Connection::execute_non_select_command(const Glib::ustring& cmd, const Glib::RefPtr<ParameterList>& params, std::auto_ptr<Glib::Error>& error)
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-{
- Command command(cmd);
-
- GError *gerror = 0;
- const int retvalue = gda_connection_execute_non_select_command(gobj(), const_cast<GdaCommand*>((command).gobj()), Glib::unwrap(params), &(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 retvalue;
-}
-
void Connection::close()
{
//gda_connection_close() does an unref, but we don't want that:
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg Mon May 26 10:21:01 2008
@@ -22,13 +22,7 @@
#include <libgdamm/transactionstatus.h>
#include <libgdamm/connectionevent.h>
-#include <libgdamm/command.h>
#include <libgdamm/datamodel.h>
-#include <libgdamm/parameterlist.h>
-#include <libgdamm/datamodelindex.h>
-#include <libgdamm/dict.h>
-//#include <libgdamm/serverprovider.h>
-//#include <libgda/gda-connection.h>
_DEFS(libgdamm,libgda)
_PINCLUDE(glibmm/private/object_p.h)
@@ -42,10 +36,6 @@
class ServerProvider;
typedef GdaServerProviderInfo ServerProviderInfo;
-/** Exception class for Gda errors.
- */
-_WRAP_GERROR(GeneralError, GdaGeneralError, GDA_GENERAL_ERROR)
-
/** Exception class for Gda connection errors.
*/
_WRAP_GERROR(ConnectionError, GdaConnectionError, GDA_CONNECTION_ERROR)
@@ -55,6 +45,7 @@
_WRAP_ENUM(ConnectionFeature, GdaConnectionFeature)
_WRAP_ENUM(ConnectionSchema, GdaConnectionSchema)
_WRAP_ENUM(ConnectionOptions, GdaConnectionOptions)
+_WRAP_ENUM(ConnectionMetaType, GdaConnectionMetaType)
/** Manages a connection to a data source.
* This class offers access to all operations involving an opened connection to a database.
@@ -87,35 +78,18 @@
gda_connection_internal_treat_sql, gda_connection_internal_transaction_rolledback,
gda_connection_internal_savepoint_removed, gda_connection_internal_transaction_committed,
gda_connection_internal_savepoint_rolledback, gda_connection_execute_command,
- gda_connection_internal_sql_executed, gda_connection_internal_change_transaction_state)
+ gda_connection_internal_sql_executed, gda_connection_internal_change_transaction_state,
+ gda_connection_internal_statement_executed, gda_connection_internal_get_provider_data,
+ gda_connection_internal_set_provider_data)
_WRAP_METHOD(bool is_opened() const, gda_connection_is_opened)
- _WRAP_METHOD(Glib::RefPtr<Client> get_client(), gda_connection_get_client, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const Client> get_client() const, gda_connection_get_client, constversion)
-
_WRAP_METHOD(ConnectionOptions get_options() const, gda_connection_get_options)
- _WRAP_METHOD(Glib::ustring get_server_version() const, gda_connection_get_server_version)
- _WRAP_METHOD(Glib::ustring get_database() const, gda_connection_get_database)
_WRAP_METHOD(Glib::ustring get_dsn() const, gda_connection_get_dsn)
_WRAP_METHOD(bool set_dsn(const Glib::ustring& datasource), gda_connection_set_dsn)
_WRAP_METHOD(Glib::ustring get_cnc_string() const, gda_connection_get_cnc_string)
- _WRAP_METHOD(Glib::ustring get_provider() const, gda_connection_get_provider)
- _WRAP_METHOD(Glib::RefPtr<ServerProvider> get_provider_obj(), gda_connection_get_provider_obj, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const ServerProvider> get_provider_obj() const, gda_connection_get_provider_obj, constversion)
-
- //Let's not bother trying to copy the ServerProviderInfo by value.
- //Its (boolean) contents should just be examined quickly and then forgotten.
- #m4 _CONVERSION(`GdaServerProviderInfo*', `const ServerProviderInfo*', `static_cast<ServerProviderInfo*>($3)')
- _WRAP_METHOD(const ServerProviderInfo* get_infos() const, gda_connection_get_infos)
-
- _WRAP_METHOD(Glib::ustring get_username() const, gda_connection_get_username)
- _WRAP_METHOD(bool set_username(const Glib::ustring& username), gda_connection_set_username)
- _WRAP_METHOD(Glib::ustring get_password() const, gda_connection_get_password)
- _WRAP_METHOD(bool set_password(const Glib::ustring& password), gda_connection_set_password)
-
_WRAP_METHOD(void add_event(const Glib::RefPtr<ConnectionEvent>& event), gda_connection_add_event)
_WRAP_METHOD( Glib::RefPtr<ConnectionEvent> add_event_string(const Glib::ustring& str), gda_connection_add_event_string)
@@ -127,155 +101,22 @@
_WRAP_METHOD(void clear_events_list(), gda_connection_clear_events_list)
- _WRAP_METHOD(bool change_database(const Glib::ustring& name), gda_connection_change_database)
-
#m4 //Use deep ownership because we own both the list and its elements;
#m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<DataModel> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
-
- _WRAP_METHOD(Glib::RefPtr<DataModel> execute_select_command(const Command& cmd, const Glib::RefPtr<ParameterList>& params), gda_connection_execute_select_command, errthrow)
-
- /** Executes a selection command on the given connection.
- *
- * Note that no check is made regarding the actual number of statements in @a cmd or if it really contains a SELECT
- * statement. This function is just a convenience function around the execute_command()
- * method. If @a cmd contains several statements, only the last DataModel is returned.
- *
- * @param cmd A Command.
- * @result A DataModel containing the data returned by the data source, or a null DataModel if an error occurred.
- *
- * @throw ConnectionError
- */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- Glib::RefPtr<DataModel> execute_select_command(const Command& cmd);
-#else
- Glib::RefPtr<DataModel> execute_select_command(const Command& cmd, std::auto_ptr<Glib::Error>& error);
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-
- /** Executes a selection command on the given connection.
- *
- * Note that no check is made regarding the actual number of statements in @a cmd or if it really contains a SELECT
- * statement. This function is just a convenience function around the execute_command()
- * method. If @a cmd contains several statements, only the last DataModel is returned.
- *
- * @param cmd A SQL command string.
- * @result A DataModel containing the data returned by the
- * data source, or a null DataModel if an error occurred.
- *
- * @throw ConnectionError
- */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- Glib::RefPtr<DataModel> execute_select_command(const Glib::ustring& cmd);
-#else
- Glib::RefPtr<DataModel> execute_select_command(const Glib::ustring& cmd, std::auto_ptr<Glib::Error>& error);
-#endif
-
- /** Executes a selection command on the given connection.
- *
- * Note that no check is made regarding the actual number of statements in @a cmd or if it really contains a SELECT
- * statement. This function is just a convenience function around the execute_command()
- * method. If @a cmd contains several statements, only the last DataModel is returned.
- * See the documentation of the execute_command() for information
- * about the @a params list of parameters.
- *
- * @param cmd A Command.
- * @param params Parameter list for the command.
- * @result A DataModel containing the data returned by the
- * data source, or a null DataModel if an error occurred.
- *
- * @throw ConnectionError
- */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- Glib::RefPtr<DataModel> execute_select_command(const Glib::ustring& cmd, const Glib::RefPtr<ParameterList>& params);
-#else
- Glib::RefPtr<DataModel> execute_select_command(const Glib::ustring& cmd, const Glib::RefPtr<ParameterList>& params, std::auto_ptr<Glib::Error>& error);
-#endif
-
- _WRAP_METHOD(int execute_non_select_command(const Command& cmd, const Glib::RefPtr<ParameterList>& params), gda_connection_execute_non_select_command, errthrow)
-
- /** Executes a non-selection command on the given connection.
- *
- * This function returns the number of rows impacted by the execution of @a cmd, or -1
- * if an error occurred, or -2 if the provider does not return the number of rows impacted.
- *
- * Note that no check is made regarding the actual number of statements in @a cmd or if it really contains a non SELECT
- * statement. This function is just a convenience function around the execute_command()
- * function. If @a cmd contains several statements, the last ParameterList is returned.
- *
- * @param cmd A Command.
- * @result the number of rows affected (>=0) or -1 or -2
- *
- * @throw ConnectionError
- */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- int execute_non_select_command(const Command& cmd);
-#else
- int execute_non_select_command(const Command& cmd, std::auto_ptr<Glib::Error>& error);
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-
- /** Executes a non-selection command on the given connection.
- *
- * This function returns the number of rows impacted by the execution of @a cmd, or -1
- * if an error occurred, or -2 if the provider does not return the number of rows impacted.
- *
- * Note that no check is made regarding the actual number of statements in @a cmd or if it really contains a non SELECT
- * statement. This function is just a convenience function around the execute_command()
- * function. If @a cmd contains several statements, the last ParameterList is returned.
- *
- * @param cmd A Command.
- * @result the number of rows affected (>=0) or -1 or -2
- *
- * @throw ConnectionError
- */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- int execute_non_select_command(const Glib::ustring& cmd);
-#else
- int execute_non_select_command(const Glib::ustring& cmd, std::auto_ptr<Glib::Error>& error);
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-
- /** Executes a non-selection command on the given connection.
- *
- * This function returns the number of rows impacted by the execution of @a cmd, or -1
- * if an error occurred, or -2 if the provider does not return the number of rows impacted.
- *
- * Note that no check is made regarding the actual number of statements in @a cmd or if it really contains a non SELECT
- * statement. This function is just a convenience function around the execute_command()
- * function. If @a cmd contains several statements, the last ParameterList is returned.
- * See the documentation of the execute_command() for information
- * about the @a params list of parameters.
- *
- * @param cmd A Command.
- * @param params Parameter list for the command.
- * @result the number of rows affected (>=0) or -1 or -2
- *
- * @throw ConnectionError
- */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- int execute_non_select_command(const Glib::ustring& cmd, const Glib::RefPtr<ParameterList>& params);
-#else
- int execute_non_select_command(const Glib::ustring& cmd, const Glib::RefPtr<ParameterList>& params, std::auto_ptr<Glib::Error>& error);
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-
+ //_WRAP_METHOD(Glib::RefPtr<DataModel> statement_execute(const Glib::RefPtr<Statement>& cmd, const Glib::RefPtr<Set>& params, StatementModelUsage model_usage, Glib::RefPtr<Set>& last_inserted_row), gda_connection_statement_execute, errthrow)
+ _WRAP_METHOD(Glib::RefPtr<DataModel> statement_execute_select(const Glib::RefPtr<Statement>& cmd, const Glib::RefPtr<Set>& params), gda_connection_statement_execute_select, errthrow)
+
+ #m4 _CONVERSION(`const Glib::ArrayHandle<GType>&', `GType*', `const_cast<GType*>(($3).data())')
+ _WRAP_METHOD(Glib::RefPtr<DataModel> statement_execute_select_full(const Glib::RefPtr<Statement>& cmd, const Glib::RefPtr<Set>& params, StatementModelUsage model_usage, const Glib::ArrayHandle<GType>& col_types), gda_connection_statement_execute_select_full, errthrow)
+ _IGNORE (gda_connection_statement_execute_select_fullv)
+
+ // TODO:
+ //_WRAP_METHOD(int statement_execute_non_select(const Glib::RefPtr<Statement>& cmd, const Glib::RefPtr<Set>& params, Glib::RefPtr<Set>& last_inserted_row), gda_connection_statement_execute_non_select, errthrow)
+
//Note that we do not add a non-const version of this because the documentation says that it should not be modified:
_WRAP_METHOD(Glib::RefPtr<const TransactionStatus> get_transaction_status() const, gda_connection_get_transaction_status, errthrow, refreturn)
-
-/*
-gint gda_connection_execute_non_select_command (GdaConnection *cnc, GdaCommand *cmd,
- GdaParameterList *params, GError **error);
-
-
- typedef ListHandle<DataModel> ListDataModels
- ListDataModels execute_command(const Command& cmd, Glib::RefPtr<ParameterList>& params), gda_connection_execute_command, errthrow)
- _IGNORE(gda_connection_execute_command)
-
- Glib::RefPtr<DataModel> execute_command(const Command& cmd);
- Glib::RefPtr<DataModel> execute_command(const Glib::ustring& cmd);
-
- //_WRAP_METHOD(Glib::RefPtr<DataModel> execute_command(const Command& cmd, const Glib::RefPtr<ParameterList>& params), gda_connection_execute_command_l, errthrow)
-*/
-
-
_WRAP_METHOD(bool begin_transaction(const Glib::ustring& name, TransactionIsolation level), gda_connection_begin_transaction, errthrow)
_WRAP_METHOD(bool commit_transaction(const Glib::ustring& name), gda_connection_commit_transaction, errthrow)
_WRAP_METHOD(bool rollback_transaction(const Glib::ustring& name), gda_connection_rollback_transaction, errthrow)
@@ -298,51 +139,18 @@
_WRAP_METHOD(Glib::ustring value_to_sql_string(const Value& from) const, gda_connection_value_to_sql_string)
_WRAP_METHOD(bool supports_feature(ConnectionFeature feature) const, gda_connection_supports_feature)
+
+ _WRAP_METHOD(Glib::ustring get_authentication() const, gda_connection_get_authentication)
+ _WRAP_METHOD(Glib::RefPtr<SqlParser> create_parser(), gda_connection_create_parser)
+
+ _WRAP_METHOD(Glib::ustring get_provider_name() const, gda_connection_get_provider_name)
+ _WRAP_METHOD(Glib::RefPtr<ServerProvider> get_provider_obj() const, gda_connection_get_provider_obj)
+ _WRAP_METHOD(bool update_meta_store (GdaMetaContext* context), gda_connection_update_meta_store, errthrow)
+
+ _WRAP_METHOD(bool statement_prepare (const Glib::RefPtr<Statement>& stmt), gda_connection_statement_prepare, errthrow)
- _WRAP_METHOD(Glib::RefPtr<DataModel> get_schema(ConnectionSchema schema, const Glib::RefPtr<ParameterList>& params), gda_connection_get_schema, errthrow, refreturn)
- // TODO: This is not constversion because the generated code does not pass
- // error to the non-const function if exceptions are disabled.
- _WRAP_METHOD(Glib::RefPtr<const DataModel> get_schema(ConnectionSchema schema, const Glib::RefPtr<ParameterList>& params) const, gda_connection_get_schema, refreturn, errthrow)
-
- /** Asks the underlying data source for a list of database objects.
- * This is the function that lets applications ask the different providers about all their database objects (tables,
- * views, procedures, etc). The set of database objects that are retrieved are given by the 2 parameters of this
- * function: schema, which specifies the specific schema required, and params, which is a list of parameters that can
- * be used to give more detail about the objects to be returned.
- *
- * The list of parameters is specific to each schema type, see the get_schema() virtual method for providers for more details.
- *
- * @param schema Database schema to get.
- * @result A DataModel containing the data required.
- *
- * @throw Gda::ConnectionError
- */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- Glib::RefPtr<DataModel> get_schema(ConnectionSchema schema);
-#else
- Glib::RefPtr<DataModel> get_schema(ConnectionSchema schema, std::auto_ptr<Glib::Error>& error);
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-
- /** Asks the underlying data source for a list of database objects.
- * This is the function that lets applications ask the different providers about all their database objects (tables,
- * views, procedures, etc). The set of database objects that are retrieved are given by the 2 parameters of this
- * function: schema, which specifies the specific schema required, and params, which is a list of parameters that can
- * be used to give more detail about the objects to be returned.
- *
- * The list of parameters is specific to each schema type, see the get_schema() virtual method for providers for more details.
- *
- * @param schema Database schema to get.
- * @result A DataModel containing the data required.
- *
- * @throw Gda::ConnectionError
- */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- Glib::RefPtr<const DataModel> get_schema(ConnectionSchema schema) const;
-#else
- Glib::RefPtr<const DataModel> get_schema(ConnectionSchema schema, std::auto_ptr<Glib::Error>& error) const;
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-
- _WRAP_METHOD(Glib::ustring get_last_insert_id(const Glib::RefPtr<DataModel>& recset) const, gda_connection_get_last_insert_id)
+ // TODO: The variable argument list must be wrapped...
+ //_WRAP_METHOD(Glib::RefPtr<DataModel> get_meta_store_data (...), gda_connection_get_meta_store_data)
_CONVERSION(`GdaConnectionEvent*',`const Glib::RefPtr<ConnectionEvent>&',Glib::wrap($3, true))
_WRAP_SIGNAL(void error(const Glib::RefPtr<ConnectionEvent>& error), "error")
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/datamodel.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/datamodel.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/datamodel.hg Mon May 26 10:21:01 2008
@@ -21,12 +21,7 @@
*/
#include <glibmm/object.h>
-#include <libgdamm/command.h>
-#include <libgdamm/row.h>
-#include <libgdamm/column.h>
-#include <libgdamm/parameterlist.h>
#include <libgdamm/datamodeliter.h>
-//#include <libgdamm/serverprovider.h>
#include <libgda/gda-data-model.h>
_DEFS(libgdamm,libgda)
@@ -82,7 +77,7 @@
_CLASS_INTERFACE(DataModel, GdaDataModel, GDA_DATA_MODEL, GdaDataModelClass)
public:
// This does not belong into this class
- _IGNORE(gda_data_model_iter_new, gda_data_model_array_copy_model)
+ _IGNORE(gda_data_model_create_iter, gda_data_model_array_copy_model)
_WRAP_METHOD(void freeze(), gda_data_model_freeze)
_WRAP_METHOD(void thaw(), gda_data_model_thaw)
@@ -151,8 +146,8 @@
* @result The string.
*/
_IGNORE(gda_data_model_export_to_string)
- Glib::ustring export_to_string(DataModelIOFormat format, const Glib::ArrayHandle<int>& cols, const Glib::ArrayHandle<int>& rows, const Glib::RefPtr<ParameterList>& options);
-
+ Glib::ustring export_to_string(DataModelIOFormat format, const Glib::ArrayHandle<int>& cols, const Glib::ArrayHandle<int>& rows, const Glib::RefPtr<Set>& options);
+
/** Exports data contained in @a model to the @a file; the format is specified using the @a format argument.
*
* Specifically, the parameters in the @options list can be:
@@ -168,15 +163,15 @@
* @result true if no error occurred.
*/
#ifdef GLIBMM_EXCEPTIONS_ENABLED
- bool export_to_file(DataModelIOFormat format, const std::string& file, const Glib::ArrayHandle<int>& cols, const Glib::ArrayHandle<int>& rows, const Glib::RefPtr<ParameterList>& options);
+ bool export_to_file(DataModelIOFormat format, const std::string& file, const Glib::ArrayHandle<int>& cols, const Glib::ArrayHandle<int>& rows, const Glib::RefPtr<Set>& options);
#else
- bool export_to_file(DataModelIOFormat format, const std::string& file, const Glib::ArrayHandle<int>& cols, const Glib::ArrayHandle<int>& rows, const Glib::RefPtr<ParameterList>& options, std::auto_ptr<Glib::Error>& error);
+ bool export_to_file(DataModelIOFormat format, const std::string& file, const Glib::ArrayHandle<int>& cols, const Glib::ArrayHandle<int>& rows, const Glib::RefPtr<Set>& options, std::auto_ptr<Glib::Error>& error);
#endif
_IGNORE(gda_data_model_export_to_file)
_WRAP_METHOD(bool import_from_model(const Glib::RefPtr<DataModel>& from, bool overwrite, GHashTable *cols_trans), gda_data_model_import_from_model, errthrow)
- _WRAP_METHOD(bool import_from_string(const Glib::ustring& string, GHashTable *cols_trans, const Glib::RefPtr<const ParameterList>& options), gda_data_model_import_from_string, errthrow)
- _WRAP_METHOD(bool import_from_file(const std::string& file, GHashTable *cols_trans, const Glib::RefPtr<const ParameterList>& options), gda_data_model_import_from_file, errthrow)
+ _WRAP_METHOD(bool import_from_string(const Glib::ustring& string, GHashTable *cols_trans, const Glib::RefPtr<const Set>& options), gda_data_model_import_from_string, errthrow)
+ _WRAP_METHOD(bool import_from_file(const std::string& file, GHashTable *cols_trans, const Glib::RefPtr<const Set>& options), gda_data_model_import_from_file, errthrow)
//Let's not wrap these. They are ugly and do not seem useful. murrayc.
_IGNORE(gda_data_model_to_xml_node, gda_data_model_add_data_from_xml_node)
@@ -202,6 +197,9 @@
_WRAP_METHOD(void signal_emit_changed(), gda_data_model_signal_emit_changed)
+ _WRAP_METHOD(void set_column_name (int col, const Glib::ustring& name), gda_data_model_set_column_name)
+ _WRAP_METHOD(Glib::ustring get_column_name (int col), gda_data_model_get_column_name)
+
//These are in a private header. Ignore them:
_IGNORE(gda_data_model_changed, gda_data_model_row_inserted, gda_data_model_row_updated, gda_data_model_row_removed,
gda_data_model_get_command_text, gda_data_model_set_command_text, gda_data_model_get_command_type,
@@ -211,6 +209,7 @@
_WRAP_SIGNAL(void row_updated(int row), row_updated)
_WRAP_SIGNAL(void row_removed(int row), row_removed)
_WRAP_SIGNAL(void reset(), reset)
+ _WRAP_SIGNAL(void changed(), changed)
protected:
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/datamodeliter.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/datamodeliter.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/datamodeliter.hg Mon May 26 10:21:01 2008
@@ -20,7 +20,7 @@
*/
#include <glibmm/object.h>
-#include <libgdamm/parameterlist.h>
+#include <glibmm/set.h>
_DEFS(libgdamm,libgda)
_PINCLUDE(libgdamm/private/parameterlist_p.h)
@@ -39,7 +39,7 @@
{
_CLASS_GOBJECT(DataModelIter, GdaDataModelIter, GDA_DATA_MODEL_ITER, ParameterList, GdaParameterList)
protected:
- _WRAP_CTOR(DataModelIter(const Glib::RefPtr<DataModel>& data_model), gda_data_model_iter_new)
+ _WRAP_CTOR(DataModelIter(const Glib::RefPtr<DataModel>& data_model), gda_data_model_create_iter)
public:
_WRAP_CREATE(const Glib::RefPtr<DataModel>& data_model)
@@ -50,9 +50,9 @@
_WRAP_METHOD(bool move_prev(), gda_data_model_iter_move_prev)
_WRAP_METHOD(int get_row() const, gda_data_model_iter_get_row)
_WRAP_METHOD(void invalidate_contents(), gda_data_model_iter_invalidate_contents)
- _WRAP_METHOD(int get_column_for_param(const Glib::RefPtr<Parameter>& param), gda_data_model_iter_get_column_for_param)
- _WRAP_METHOD(Glib::RefPtr<Parameter> get_param_for_column(int col), gda_data_model_iter_get_param_for_column, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const Parameter> get_param_for_column(int col) const, gda_data_model_iter_get_param_for_column, constversion)
+
+ _WRAP_METHOD(Glib::Value get_value_at (int col), gda_data_model_iter_get_value_at)
+ _WRAP_METHOD(Glib::Value get_value_for_field (const Glib::ustring& field_name), gda_data_model_iter_get_value_for_field)
_WRAP_PROPERTY("current-row", int)
_WRAP_PROPERTY("data-model", Glib::RefPtr<DataModel>)
@@ -61,6 +61,7 @@
_WRAP_SIGNAL(void end_of_data(), "end-of-data")
_WRAP_SIGNAL(void row_changed(int row), "row-changed")
+ _WRAP_SIGNAL(bool row_to_change(int row), "row-to-change")
};
} // namespace Gda
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/datamodelquery.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/datamodelquery.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/datamodelquery.hg Mon May 26 10:21:01 2008
@@ -23,8 +23,8 @@
#include <glibmm/object.h>
#include <libgdamm/object.h>
#include <libgdamm/datamodel.h>
-#include <libgdamm/parameterlist.h>
-#include <libgdamm/query.h>
+#include <libgdamm/set.h>
+#include <libgdamm/statement.h>
_DEFS(libgdamm,libgda)
_PINCLUDE(libgdamm/private/object_p.h)
@@ -66,11 +66,11 @@
public:
_WRAP_CREATE(Glib::RefPtr<Query>& query)
- _WRAP_METHOD(Glib::RefPtr<ParameterList> get_parameter_list(), gda_data_model_query_get_parameter_list, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const ParameterList> get_parameter_list() const, gda_data_model_query_get_parameter_list, constversion)
+ _WRAP_METHOD(Glib::RefPtr<Set> get_parameter_list(), gda_data_model_query_get_parameter_list, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Set> get_parameter_list() const, gda_data_model_query_get_parameter_list, constversion)
_WRAP_METHOD(bool query_refresh(), gda_data_model_query_refresh, errthrow)
- _WRAP_METHOD(bool set_modification_query(const Glib::ustring& query), gda_data_model_query_set_modification_query, errthrow)
+ _WRAP_METHOD(bool set_modification_query(const Glib::RefPtr<Statement>& query), gda_data_model_query_set_modification_query, errthrow)
_WRAP_METHOD(bool compute_modification_queries(const Glib::ustring& target, DataModelQueryOptions options), gda_data_model_query_compute_modification_queries, errthrow)
};
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/dataproxy.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/dataproxy.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/dataproxy.hg Mon May 26 10:21:01 2008
@@ -98,6 +98,11 @@
_WRAP_METHOD(int get_sample_end() const, gda_data_proxy_get_sample_end)
_WRAP_METHOD(bool apply_all_changes(), gda_data_proxy_apply_all_changes, errthrow)
_WRAP_METHOD(bool cancel_all_changes(), gda_data_proxy_cancel_all_changes)
+
+ _WRAP_METHOD(int get_filtered_n_rows(), gda_data_proxy_get_filtered_n_rows)
+ _WRAP_METHOD(Glib::ustring get_filter_expr(), gda_data_proxy_get_filter_expr)
+ _WRAP_METHOD(void get_filter_expr(const Glib::ustring& filter_expr), gda_data_proxy_set_filter_expr, errthrow)
+ _WRAP_METHOD(void set_ordering_column(int col), gda_data_proxy_set_ordering_column, errthrow)
_WRAP_PROPERTY("model", Glib::RefPtr<DataModel>)
_WRAP_PROPERTY("prepend-null-entry", bool)
@@ -107,6 +112,7 @@
_WRAP_SIGNAL(void sample_size_changed(int sample_size), "sample-size-changed")
_WRAP_SIGNAL(bool pre_changes_applied(int row, int proxied_row), "pre-changes-applied")
_WRAP_SIGNAL(void post_changes_applied(int row, int proxied_row), "post-changes-applied")
+ _WRAP_SIGNAL(void filter_changed(), "filter-changed")
};
} // namespace Gda
Copied: libgdamm/branches/libgdamm-4-0/libgda/src/row.hg (from r1531, /libgdamm/trunk/libgda/src/row.hg)
==============================================================================
--- /libgdamm/trunk/libgda/src/row.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/row.hg Mon May 26 10:21:01 2008
@@ -79,6 +79,9 @@
//These are not sensible for libgdamm:
//_WRAP_PROPERTY("values", GList*)
//_WRAP_PROPERTY("nb_values", int)
+
+ _WRAP_SIGNAL (bool value_to_change (int num, Glib::Value& current, Glib::Value& proposed), "value-to-change")
+ _WRAP_SIGNAL (void value_changed (int num, Glib::Value& current, Glib::Value& proposed), "value-changed")
};
} // namespace Gda
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.ccg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.ccg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.ccg Mon May 26 10:21:01 2008
@@ -30,40 +30,6 @@
{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
-Glib::RefPtr<DataModel> ServerProvider::get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema)
-#else
-Glib::RefPtr<DataModel> ServerProvider::get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema, std::auto_ptr<Glib::Error>& error)
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-{
- GError *gerror = 0;
- Glib::RefPtr<DataModel> retvalue = Glib::wrap(gda_server_provider_get_schema(const_cast<GdaServerProvider*>(gobj()), Glib::unwrap(cnc), ((GdaConnectionSchema)(schema)), 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 retvalue;
-}
-
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
-Glib::RefPtr<const DataModel> ServerProvider::get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema) const
-#else
-Glib::RefPtr<const DataModel> ServerProvider::get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema, std::auto_ptr<Glib::Error>& error) const
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-{
- ServerProvider* this_nonconst = const_cast<ServerProvider*>(this);
-
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- return this_nonconst->get_schema(cnc, schema);
-#else
- return this_nonconst->get_schema(cnc, schema, error);
-#endif
-}
-
-
} // namespace Gda
} // namespace Gnome
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.hg Mon May 26 10:21:01 2008
@@ -20,12 +20,10 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-//#include <libgdamm/connection.h>
-#include <libgdamm/command.h>
+#include <libgdamm/statement.h>
+#include <libgdamm/connection.h>
#include <libgdamm/datamodelindex.h>
-#include <libgdamm/client.h>
#include <libgdamm/serveroperation.h>
-#include <libgdamm/query.h>
#include <libgdamm/datahandler.h>
_DEFS(libgdamm,libgda)
@@ -54,64 +52,23 @@
_CLASS_GOBJECT(ServerProvider, GdaServerProvider, GDA_SERVER_PROVIDER, Glib::Object, GObject)
_WRAP_METHOD(Glib::ustring get_version() const, gda_server_provider_get_version)
- _WRAP_METHOD(bool open_connection(const Glib::RefPtr<Connection>& cnc, GdaQuarkList *params, const Glib::ustring& username, const Glib::ustring& password), gda_server_provider_open_connection)
- _WRAP_METHOD(bool close_connection(const Glib::RefPtr<Connection>& cnc), gda_server_provider_close_connection)
_WRAP_METHOD(Glib::ustring get_server_version(const Glib::RefPtr<Connection>& cnc) const, gda_server_provider_get_server_version)
- _WRAP_METHOD(Glib::ustring get_database(const Glib::RefPtr<Connection>& cnc) const, gda_server_provider_get_database)
- _WRAP_METHOD(bool change_database(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& name), gda_server_provider_change_database)
-
- //TODO: Copy-by-value somehow?
- #m4 _CONVERSION(`GdaServerProviderInfo*', `const ServerProviderInfo*', `static_cast<ServerProviderInfo*>($3)')
- _WRAP_METHOD(const ServerProviderInfo* get_info(const Glib::RefPtr<Connection>& cnc) const, gda_server_provider_get_info)
//TODO: options may be NULL: Add a method overload.
- _WRAP_METHOD(bool supports_operation(const Glib::RefPtr<Connection>& cnc, ServerOperationType type, const Glib::RefPtr<ParameterList>& options) const, gda_server_provider_supports_operation)
+ _WRAP_METHOD(bool supports_operation(const Glib::RefPtr<Connection>& cnc, ServerOperationType type, const Glib::RefPtr<Set>& options) const, gda_server_provider_supports_operation)
- _WRAP_METHOD(Glib::RefPtr<ServerOperation> create_operation (const Glib::RefPtr<Connection>& cnc,ServerOperationType type, const Glib::RefPtr<ParameterList>& options), gda_server_provider_create_operation, errthrow)
+ _WRAP_METHOD(Glib::RefPtr<ServerOperation> create_operation (const Glib::RefPtr<Connection>& cnc,ServerOperationType type, const Glib::RefPtr<Set>& options), gda_server_provider_create_operation, errthrow)
_WRAP_METHOD(Glib::ustring render_operation(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<ServerOperation>& op), gda_server_provider_render_operation, errthrow)
_WRAP_METHOD(bool perform_operation(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<ServerOperation>& op), gda_server_provider_perform_operation, errthrow)
- #m4 //Use deep ownership because we own both the list and its elements;
- #m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<DataModel> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
- _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<DataModel> > execute_command(const Glib::RefPtr<Connection>& cnc, const Command& cmd, const Glib::RefPtr<ParameterList>& params), gda_server_provider_execute_command)
-
- _WRAP_METHOD(bool begin_transaction(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& name, TransactionIsolation level), gda_server_provider_begin_transaction, errthrow)
- _WRAP_METHOD(bool commit_transaction(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& name), gda_server_provider_commit_transaction, errthrow)
- _WRAP_METHOD(bool rollback_transaction(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& name), gda_server_provider_rollback_transaction, errthrow)
-
- _WRAP_METHOD(bool add_savepoint(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& name), gda_server_provider_add_savepoint, errthrow)
- _WRAP_METHOD(bool rollback_savepoint(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& name), gda_server_provider_rollback_savepoint, errthrow)
- _WRAP_METHOD(bool delete_savepoint(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& name), gda_server_provider_delete_savepoint, errthrow)
-
_WRAP_METHOD(bool supports_feature(const Glib::RefPtr<Connection>& cnc, ConnectionFeature feature) const, gda_server_provider_supports_feature)
- // We don't use refreturn here because this returns a new object with an initial reference:
- _WRAP_METHOD(Glib::RefPtr<DataModel> get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema, const Glib::RefPtr<ParameterList>& params), gda_server_provider_get_schema, errthrow)
-
- // TODO: This is not constversion because the generated code does not pass
- // error to the non-const function if exceptions are disabled.
- _WRAP_METHOD(Glib::RefPtr<const DataModel> get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema, const Glib::RefPtr<ParameterList>& params) const, gda_server_provider_get_schema, refreturn, errthrow)
-
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- Glib::RefPtr<DataModel> get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema);
-#else
- Glib::RefPtr<DataModel> get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema, std::auto_ptr<Glib::Error>& error);
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- Glib::RefPtr<const DataModel> get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema) const;
-#else
- Glib::RefPtr<const DataModel> get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema, std::auto_ptr<Glib::Error>& error) const;
-#endif // GLIBMM_EXCEPTIONS_ENABLED
_WRAP_METHOD(Glib::ustring value_to_sql_string(const Glib::RefPtr<Connection>& cnc, const Value& from) const, gda_server_provider_value_to_sql_string)
- _WRAP_METHOD(Glib::ustring get_last_insert_id(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<DataModel>& recset) const, gda_server_provider_get_last_insert_id)
-
_WRAP_METHOD(Glib::ustring escape_string(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& str), gda_server_provider_escape_string)
_WRAP_METHOD(Glib::ustring unescape_string(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& str), gda_server_provider_unescape_string)
- _WRAP_METHOD(Glib::RefPtr<Gda::Object> execute_query(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<Query>& query, const Glib::RefPtr<ParameterList>& params), gda_server_provider_execute_query)
_WRAP_METHOD(Glib::RefPtr<DataHandler> get_data_handler_dbms(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& for_type), gda_server_provider_get_data_handler_dbms, refreturn)
_WRAP_METHOD(Glib::RefPtr<const DataHandler> get_data_handler_dbms(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& for_type) const, gda_server_provider_get_data_handler_dbms, constversion)
@@ -121,8 +78,14 @@
_WRAP_METHOD(Glib::ustring get_default_dbms_type(const Glib::RefPtr<Connection>& cnc, GType type), gda_server_provider_get_default_dbms_type)
+ _WRAP_METHOD(Glib::ustring get_name(), gda_server_provider_get_name)
+ _WRAP_METHOD(Glib::RefPtr<SqlParser> create_parser(const Glib::RefPtr<Connection>& cnc), gda_server_provider_create_parser)
+ // TODO:
+ _WRAP_METHOD(Glib::Value string_to_value(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& string, GType prefered_type, gchar** dbms_type), gda_server_provider_string_to_value)
+
// These are in a private header, so ignore them
- _IGNORE(gda_server_provider_handler_declare, gda_server_provider_handler_find)
+ _IGNORE(gda_server_provider_handler_declare, gda_server_provider_handler_find,
+ gda_server_provider_interal_get_parser)
//TODO: vfuncs.
};
Added: libgdamm/branches/libgdamm-4-0/libgda/src/set.ccg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/set.ccg Mon May 26 10:21:01 2008
@@ -0,0 +1,29 @@
+// -*- C++ -*- // this is for the .ccg, I realize gensig puts one in
+
+/* set.cc
+ *
+ * Copyright 2003 libgdamm Development Team
+ *
+ * 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; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgdamm/set.h>
+
+namespace Gnome
+{
+
+
+} /* namespace Gnome */
+
Added: libgdamm/branches/libgdamm-4-0/libgda/src/set.hg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/set.hg Mon May 26 10:21:01 2008
@@ -0,0 +1,62 @@
+// -*- C++ -*- // this is for the .hg, I realize gensig puts one in
+
+/* set.h
+ *
+ * Copyright 2006 libgdamm Development Team
+ *
+ * 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; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+_DEFS(libgdamm,libgda)
+_PINCLUDE(libgdamm/private/object_p.h)
+
+namespace Gnome
+{
+
+namespace Gda
+{
+
+/** Container for several values
+ *
+ * @ingroup Connection
+ */
+class GdaSet : public Glib::Object
+{
+ _CLASS_GOBJECT(Set, GdaSet, GDA_SET, Glib::Object, GObject)
+public:
+ _WRAP_CREATE()
+
+ _WRAP_METHOD (Glib::ustring get_spec(), gda_set_get_spec)
+ _WRAP_METHOD (Glib::Value get_holder_value(const Glib::ustring& holder_id), gda_set_get_holder_value)
+ // TODO:
+ //_WRAP_METHOD (bool set_holder_value())
+
+ _WRAP_METHOD (Glib::RefPtr<Holder> gda_set_get_holder (Glib::ustring holder_id), gda_set_get_holder)
+ _WRAP_METHOD (void add_holder (const Glib::RefPtr<Holder>& holder), gda_set_add_holder)
+ _WRAP_METHOD (void remove_holder (const Glib::RefPtr<Holder>& holder), gda_set_remove_holder)
+
+ _WRAP_METHOD (void merge_with_set (const Glib::RefPtr<Set>& set_to_merge), gda_set_merge_with_set)
+
+ _WRAP_METHOD (bool is_valid() const, gda_set_is_valid)
+
+ _WRAP_SIGNAL (void holder_attr_changed (const Glib::RefPtr<Holder>& holder), "holder-attr-changed")
+ _WRAP_SIGNAL (void holder_changed (const Glib::RefPtr<Holder>& holder), "holder-changed")
+ _WRAP_SIGNAL (void holder_plugin_changed (const Glib::RefPtr<Holder>& holder), "holder-plugin-changed")
+ _WRAP_SIGNAL (void public_data_changed (), "public-data-changed")
+};
+
+} // namespace Gda
+} // namespace Gnome
+
Modified: libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4
==============================================================================
--- libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4 (original)
+++ libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4 Mon May 26 10:21:01 2008
@@ -7,6 +7,7 @@
_CONVERSION(`GdaDataModelIter*',`Glib::RefPtr<DataModelIter>',`Glib::wrap($3)')
_CONVERSION(`GdaConnection*',`Glib::RefPtr<Connection>',`Glib::wrap($3)')
+_CONVERSION(`GdaStatement*',`Glib::RefPtr<Statement>',`Glib::wrap($3)')
_CONVERSION(`GdaTransactionStatus*',`Glib::RefPtr<TransactionStatus>',`Glib::wrap($3)')
_CONVERSION(`GdaTransactionStatus*',`Glib::RefPtr<const TransactionStatus>',`Glib::wrap($3)')
_CONVERSION(`GdaClient*',`Glib::RefPtr<Client>',`Glib::wrap($3)')
@@ -27,69 +28,34 @@
_CONVERSION(`GdaObject*',`Glib::RefPtr<Object>',`Glib::wrap($3)')
_CONVERSION(`GdaObject*',`const Glib::RefPtr<Object>',`Glib::wrap($3)')
_CONVERSION(`GObject*',`Glib::RefPtr<Parameter>',`Glib::wrap($3)')
-_CONVERSION(`GdaParameter*',`Glib::RefPtr<Parameter>',`Glib::wrap($3)')
-_CONVERSION(`GdaParameter*',`Glib::RefPtr<const Parameter>',`Glib::wrap($3)')
-_CONVERSION(`GdaParameterList*',`Glib::RefPtr<ParameterList>',`Glib::wrap($3)')
-_CONVERSION(`GdaParameterList*',`const Glib::RefPtr<ParameterList>&',`Glib::wrap($3)')
+_CONVERSION(`GdaSet*',`Glib::RefPtr<Set>',`Glib::wrap($3)')
+_CONVERSION(`GdaSet*',`Glib::RefPtr<const Set>',`Glib::wrap($3)')
+_CONVERSION(`GdaHolder*',`Glib::RefPtr<Holder>',`Glib::wrap($3)')
+_CONVERSION(`GdaHolder*',`const Glib::RefPtr<Holder>&',`Glib::wrap($3)')
_CONVERSION(`GdaServerProvider*',`Glib::RefPtr<ServerProvider>',`Glib::wrap($3)')
_CONVERSION(`GdaServerOperation*',`Glib::RefPtr<ServerOperation>',`Glib::wrap($3)')
-_CONVERSION(`GdaQuery*',`Glib::RefPtr<Query>',`Glib::wrap($3)')
-_CONVERSION(`GdaQuery*',`const Glib::RefPtr<Query>&',`Glib::wrap($3)')
_CONVERSION(`GdaDataHandler*',`Glib::RefPtr<DataHandler>',`Glib::wrap($3)')
-_CONVERSION(`GdaQueryField*',`Glib::RefPtr<QueryField>',`Glib::wrap($3)')
-_CONVERSION(`GdaQueryField*',`Glib::RefPtr<const QueryField>',`Glib::wrap($3)')
-_CONVERSION(`GdaQueryTarget*',`Glib::RefPtr<QueryTarget>',`Glib::wrap($3)')
-_CONVERSION(`GdaQueryTarget*',`const Glib::RefPtr<QueryTarget>&',`Glib::wrap($3)')
-_CONVERSION(`GdaQueryCondition*',`Glib::RefPtr<QueryCondition>',`Glib::wrap($3)')
-_CONVERSION(`GdaQueryCondition*',`Glib::RefPtr<const QueryCondition>',`Glib::wrap($3)')
-_CONVERSION(`GdaQueryJoin*',`Glib::RefPtr<QueryJoin>',`Glib::wrap($3)')
-_CONVERSION(`GdaQueryJoin*',`Glib::RefPtr<const QueryJoin>',`Glib::wrap($3)')
-_CONVERSION(`GdaQueryJoin*',`const Glib::RefPtr<QueryJoin>&',`Glib::wrap($3)')
+_CONVERSION(`GdaSqlParser*',`Glib::RefPtr<SqlParser>',`Glib::wrap($3)')
-_CONVERSION(`const Glib::RefPtr<BlobOp>&', `GdaBlobOp*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<DataModel>&', `GdaDataModel*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<DataModelIter>&', `GdaDataModelIter*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<ServerProvider>&', `GdaServerProvider*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<ServerOperation>&', `GdaServerOperation*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<TransactionStatus>&', `GdaTransactionStatus*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Connection>&', `GdaConnection*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<Dict>&', `GdaDict*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`Glib::RefPtr<DictType>', `GdaDictType*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<DictType>&', `GdaDictType*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<DictField>&', `GdaDictField*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<const DictField>&', `GdaDictField*', __CONVERT_CONST_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<DictTable>&', `GdaDictTable*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<DictConstraint>&', `GdaDictConstraint*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<const DictConstraint>&', `GdaDictConstraint*', __CONVERT_CONST_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<DictDatabase>&', `GdaDictDatabase*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Object>&', `GdaObject*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gda::Object>&', `GdaObject*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<Parameter>&', `GdaParameter*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`Glib::RefPtr<Parameter>', `GdaParameter*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<const Parameter>&', `const GdaParameter*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<const Parameter>&', `GdaParameter*', __CONVERT_CONST_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<ParameterList>&', `GdaParameterList*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<const ParameterList>&', `GdaParameterList*', __CONVERT_CONST_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<Query>&', `GdaQuery*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<QueryField>&', `GdaQueryField*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<const QueryField>&', `GdaQueryField*', __CONVERT_CONST_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<QueryTarget>&', `GdaQueryTarget*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<QueryCondition>&', `GdaQueryCondition*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<QueryJoin>&', `GdaQueryJoin*', __CONVERT_REFPTR_TO_P)
-
-
-# The const_cast here is silly and should not be necessary - we should fix the wrap() methods some time:
-_CONVERSION(`const Command&', `GdaCommand*', `const_cast<GdaCommand*>(($3).gobj())')
+_CONVERSION(`const Glib::RefPtr<Statement>&', `GdaStatement*', __CONVERT_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<Set>&', `GdaSet*', __CONVERT_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<Holder>&', `GdaHolder*', __CONVERT_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<const Set>&', `const GdaSet*', __CONVERT_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<const Set>&', `GdaSet*', __CONVERT_CONST_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Row>&', `const GdaRow*', `($3)->gobj()')
_CONVERSION(`const Glib::RefPtr<Row>&', `GdaRow*', `const_cast<GdaRow*>(($3)->gobj())')
_CONVERSION(`GdaRow*',`Glib::RefPtr<Row>',`Glib::wrap($3)')
_CONVERSION(`GdaRow*',`Glib::RefPtr<const Row>',`Glib::wrap($3)')
-_CONVERSION(`const Value&', `GdaValue*', `const_cast<GdaValue*>(($3).gobj())')
-_CONVERSION(`const Value&', `const GdaValue*', `($3).gobj()')
-
-
_CONVERSION(`GdaColumn*',`Glib::RefPtr<Column>',`Glib::wrap($3)')
_CONVERSION(`GdaColumn*',`Glib::RefPtr<const Column>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<Column>&', `GdaColumn*', __CONVERT_REFPTR_TO_P)
@@ -97,28 +63,6 @@
_CONVERSION(`const Glib::RefPtr<const Column>&', `const GdaColumn*', __CONVERT_REFPTR_TO_P)
#_CONVERSION(`Column&', `GdaColumn*', `($3).gobj()')
-
-_CONVERSION(`GdaEntityField*',`Glib::RefPtr<EntityField>',`Glib::wrap($3)')
-_CONVERSION(`GdaEntityField*',`Glib::RefPtr<const EntityField>',`Glib::wrap($3)')
-_CONVERSION(`const Glib::RefPtr<EntityField>&', `GdaEntityField*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<const EntityField>&', `const GdaEntityField*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<const EntityField>&', `GdaEntityField*', __CONVERT_CONST_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<EntityField>&', `const GdaEntityField*', __CONVERT_REFPTR_TO_P)
-
-_CONVERSION(`GdaEntity*',`Glib::RefPtr<Entity>',`Glib::wrap($3)')
-_CONVERSION(`GdaEntity*',`Glib::RefPtr<const Entity>',`Glib::wrap($3)')
-_CONVERSION(`Glib::RefPtr<Entity>', `GdaEntity*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<Entity>&', `GdaEntity*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<const Entity>&', `const GdaEntity*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<Entity>&', `const GdaEntity*', __CONVERT_REFPTR_TO_P)
-
-_CONVERSION(`GdaDict*',`Glib::RefPtr<Dict>',`Glib::wrap($3)')
-_CONVERSION(`GdaDict*',`Glib::RefPtr<const Dict>',`Glib::wrap($3)')
-
-_CONVERSION(`GdaDictType*',`Glib::RefPtr<DictType>',`Glib::wrap($3)')
-_CONVERSION(`GdaDictType*',`const Glib::RefPtr<DictType>&',`Glib::wrap($3)')
-_CONVERSION(`GdaDictType*',`Glib::RefPtr<const DictType>',`Glib::wrap($3)')
-
_CONVERSION(`GdaColumnIndex*',`Glib::RefPtr<ColumnIndex>',`Glib::wrap($3)')
_CONVERSION(`const DataModelIndex&', `const GdaDataModelIndex*', `($3).gobj()')
@@ -133,6 +77,11 @@
_CONVERSION(`const Value&', `const GValue*', `($3).gobj()')
_CONVERSION(`GValue*', `Value', `$2($3)')
_CONVERSION(`const GValue*', `Value', `$2($3)')
+_CONVERSION(`GValue*', `Glib::Value', `$2($3)')
+_CONVERSION(`const GValue*', `Glib::Value', `$2($3)')
+_CONVERSION(`Glib::Value&', `GValue*', `($3).gobj()')
+_CONVERSION(`const Glib::Value&', `const GValue*', `($3).gobj()')
+_CONVERSION(`GValue*', `Glib::Value&', `$2($3)')
_CONVERSION(`GdaRow*', `const Glib::RefPtr<Row>', `Glib::wrap($3)')
_CONVERSION(`GdaRow*', `const Glib::RefPtr<const Row>', `Glib::wrap($3)')
@@ -161,8 +110,6 @@
#_CONVERSION(`GdaServerOperationNodeType' `ServerOperationNodeType',`(($2)($3))')
-_CONV_ENUM(Gda,CommandType)
-_CONV_ENUM(Gda,CommandOptions)
_CONV_ENUM(Gda,ConnectionFeature)
_CONV_ENUM(Gda,ConnectionSchema)
_CONV_ENUM(Gda,ClientEvent)
@@ -177,18 +124,12 @@
_CONV_ENUM(Gda,Sorting)
_CONV_ENUM(Gda,ConnectionEventCode)
_CONV_ENUM(Gda,ConnectionEventType)
+_CONV_ENUM(Gda,ConnectionMetaType)
_CONV_ENUM(Gda,ServerOperationType)
_CONV_ENUM(Gda,ServerOperationNodeType)
_CONV_ENUM(Gda,ServerOperationNodeStatus)
-_CONV_ENUM(Gda,QueryType)
-_CONV_ENUM(Gda,QueryConditionType)
-_CONV_ENUM(Gda,QueryConditionOperator)
-_CONV_ENUM(Gda,QueryJoinType)
-_CONV_ENUM(Gda,QueryFieldState)
-_CONV_ENUM(Gda,DictConstraintType)
-_CONV_ENUM(Gda,DictConstraintFkAction)
-_CONV_ENUM(Gda,DictFieldAttribute)
_CONV_ENUM(Gda,ValueAttribute)
+_CONV_ENUM(Gda,StatementModelUsage)
# Lists
_CONVERSION(`const Glib::ListHandle<Value>&',`GList*',`$3.data()')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]