diff --git a/libgda/src/serveroperation.ccg b/libgda/src/serveroperation.ccg index 7062331..7f34bd6 100644 --- a/libgda/src/serveroperation.ccg +++ b/libgda/src/serveroperation.ccg @@ -77,6 +77,25 @@ void ServerOperation::set_value_at_as_value(const Glib::ustring& path, const Gli ::Glib::Error::throw_exception(gerror); } +static Glib::RefPtr prepare_create_table( + Glib::RefPtr &cnc, + const Glib::ustring &table_name, + std::vector &arguments) +{ + GError* gerror = 0; + Glib::RefPtr op = + Glib::wrap(gda_server_operation_prepare_create_table( + cnc.operator->()->gobj(), + table_name.c_str(), + Glib::ListHandler::vector_to_list(arguments).data(), + &gerror) + ); + + if(gerror) ::Glib::Error::throw_exception(gerror); + + return op; +} + } /* namespace Gda */ } /* namespace Gnome */ diff --git a/libgda/src/serveroperation.hg b/libgda/src/serveroperation.hg index 079651d..286bbbf 100644 --- a/libgda/src/serveroperation.hg +++ b/libgda/src/serveroperation.hg @@ -62,12 +62,17 @@ public: _WRAP_ENUM(Type, GdaServerOperationType, NO_GTYPE) // These are from gda-easy but they fit in here best - static Glib::RefPtr prepare_create_database(const Glib::ustring& provider, + static Glib::RefPtr prepare_create_database(const Glib::ustring& provider, const Glib::ustring& db_name); - static Glib::RefPtr prepare_drop_database(const Glib::ustring& provider, + static Glib::RefPtr prepare_drop_database(const Glib::ustring& provider, const Glib::ustring& db_name); + static Glib::RefPtr prepare_create_table( + Glib::RefPtr &cnc, + const Glib::ustring &table_name, + std::vector &arguments); + _WRAP_METHOD(void perform_create_table(), gda_server_operation_perform_create_table, errthrow) _WRAP_METHOD(void perform_drop_database(const Glib::ustring& provider), gda_server_operation_perform_drop_database, errthrow) _WRAP_METHOD(void perform_create_database(const Glib::ustring& provider), gda_server_operation_perform_create_database, errthrow) diff --git a/tools/m4/convert_libgdamm.m4 b/tools/m4/convert_libgdamm.m4 index 255f651..529015e 100644 --- a/tools/m4/convert_libgdamm.m4 +++ b/tools/m4/convert_libgdamm.m4 @@ -45,6 +45,8 @@ _CONVERSION(`GdaServerProvider*',`Glib::RefPtr',`Glib::wrap($3)' _CONVERSION(`GdaServerProvider*',`Glib::RefPtr',`Glib::wrap($3)') _CONVERSION(`GdaServerOperation*',`Glib::RefPtr',`Glib::wrap($3)') _CONVERSION(`GdaServerOperation*',`Glib::RefPtr',`Glib::wrap($3)') +_CONVERSION(`GdaServerOperationCreateTableArg*',`Glib::RefPtr',`Glib::wrap($3)') +_CONVERSION(`GdaServerOperationCreateTableArg*',`Glib::RefPtr',`Glib::wrap($3)') _CONVERSION(`GdaDataHandler*',`Glib::RefPtr',`Glib::wrap($3)') _CONVERSION(`GdaSqlParser*',`Glib::RefPtr',`Glib::wrap($3)') _CONVERSION(`GdaSqlParser*',`Glib::RefPtr',`Glib::wrap($3)')