gnomemm r1943 - in libgdamm/trunk: . libgda/src



Author: jhs
Date: Sun Jan  4 14:14:40 2009
New Revision: 1943
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1943&view=rev

Log:
2009-01-04  Johannes Schmid <jschmid openismus com>

        * libgda/src/dataselect.ccg:
        * libgda/src/dataselect.hg:
        * libgda/src/holder.hg:
        * libgda/src/metastore.ccg:
        * libgda/src/metastore.hg:
        * libgda/src/metastruct.hg:
        * libgda/src/row.hg:
        Wrapped various missing methods



Modified:
   libgdamm/trunk/ChangeLog
   libgdamm/trunk/libgda/src/dataselect.ccg
   libgdamm/trunk/libgda/src/dataselect.hg
   libgdamm/trunk/libgda/src/holder.hg
   libgdamm/trunk/libgda/src/metastore.ccg
   libgdamm/trunk/libgda/src/metastore.hg
   libgdamm/trunk/libgda/src/metastruct.hg
   libgdamm/trunk/libgda/src/row.hg

Modified: libgdamm/trunk/libgda/src/dataselect.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/dataselect.ccg	(original)
+++ libgdamm/trunk/libgda/src/dataselect.ccg	Sun Jan  4 14:14:40 2009
@@ -20,6 +20,7 @@
  */
 
 #include <libgda/gda-data-select.h>
+#include <libgdamm/connection.h>
 
 namespace Gnome
 {

Modified: libgdamm/trunk/libgda/src/dataselect.hg
==============================================================================
--- libgdamm/trunk/libgda/src/dataselect.hg	(original)
+++ libgdamm/trunk/libgda/src/dataselect.hg	Sun Jan  4 14:14:40 2009
@@ -72,6 +72,8 @@
   _WRAP_METHOD(void compute_modification_statements(), gda_data_select_compute_modification_statements, errthrow)
   _WRAP_METHOD(void compute_columns_attributes(), gda_data_select_compute_columns_attributes, errthrow)
 
+  _WRAP_METHOD(Glib::RefPtr<Connection> get_connection(), gda_data_select_get_connection)
+
   _WRAP_PROPERTY("auto-reset", bool)
   _WRAP_PROPERTY("store-all-rows", bool)
   _WRAP_PROPERTY("connection", Glib::RefPtr<Connection>)

Modified: libgdamm/trunk/libgda/src/holder.hg
==============================================================================
--- libgdamm/trunk/libgda/src/holder.hg	(original)
+++ libgdamm/trunk/libgda/src/holder.hg	Sun Jan  4 14:14:40 2009
@@ -60,7 +60,7 @@
   _WRAP_METHOD(Value take_static_value (const Value& value, bool& value_changed), gda_holder_take_static_value, errthrow)
 
   void set_attribute(const Glib::ustring& attribute, const Value& value);
-
+  _IGNORE(gda_holder_set_attribute)
   //TODO: gda_holder_set_attribute() has stupid memory management: _WRAP_METHOD(void set_attribute(const Glib::ustring& attribute, const Value& value), gda_holder_set_attribute)
 
   _WRAP_METHOD(Value get_attribute(const Glib::ustring& attribute) const, gda_holder_get_attribute) 

Modified: libgdamm/trunk/libgda/src/metastore.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/metastore.ccg	(original)
+++ libgdamm/trunk/libgda/src/metastore.ccg	Sun Jan  4 14:14:40 2009
@@ -47,6 +47,25 @@
 }
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
+bool MetaStore::modify(const Glib::ustring& sql, const Glib::RefPtr<DataModel>& data_model, const Glib::ustring& condition)
+#else
+bool MetaStore::modify(const Glib::ustring& sql, const Glib::RefPtr<DataModel>& data_model, const Glib::ustring& condition, std::auto_ptr<Glib::Error>& err)
+#endif
+{
+  GError* gerror = 0;
+  bool retval = static_cast<bool>(gda_meta_store_modify(gobj(), sql.c_str(), Glib::unwrap(data_model), condition.c_str(), &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
 bool MetaStore::get_attribute_value(const Glib::ustring& att_name, Glib::ustring& att_value)
 #else
 bool MetaStore::get_attribute_value(const Glib::ustring& att_name, Glib::ustring& att_value, std::auto_ptr<Glib::Error>)

Modified: libgdamm/trunk/libgda/src/metastore.hg
==============================================================================
--- libgdamm/trunk/libgda/src/metastore.hg	(original)
+++ libgdamm/trunk/libgda/src/metastore.hg	Sun Jan  4 14:14:40 2009
@@ -50,6 +50,8 @@
  */
 class MetaStore : public Glib::Object
 {
+  typedef GdaMetaContext MetaContext;
+  
   _CLASS_GOBJECT(MetaStore, GdaMetaStore, GDA_META_STORE, Glib::Object, GObject)
 protected:
   _WRAP_CTOR(MetaStore(const Glib::ustring& cnc_string), gda_meta_store_new)
@@ -66,8 +68,15 @@
 #else
   Glib::RefPtr<DataModel> extract(const Glib::ustring& sql, std::auto_ptr<Glib::Error>& err);
 #endif  
-  _IGNORE (gda_meta_store_modify_with_context)
-  //_WRAP_METHOD(bool modify_with_context (MetaContext* context, const Glib::RefPtr<DataModel>& new_data), gda_meta_store_modify_with_context, errthrow)
+  _WRAP_METHOD_DOCS_ONLY (gda_meta_store_modify)
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  bool modify(const Glib::ustring& sql, const Glib::RefPtr<DataModel>& data_model, const Glib::ustring& condition);
+#else
+  bool modify(const Glib::ustring& sql, const Glib::RefPtr<DataModel>& data_model, const Glib::ustring& condition, std::auto_ptr<Glib::Error>& err);
+#endif
+   
+  _WRAP_METHOD(bool modify_with_context (MetaContext* context, const Glib::RefPtr<DataModel>& new_data), gda_meta_store_modify_with_context, errthrow)
+
   _WRAP_METHOD(Glib::RefPtr<DataModel> create_modify_data_model(const Glib::ustring& table_name), gda_meta_store_create_modify_data_model)
   _WRAP_METHOD(Glib::RefPtr<MetaStruct> schema_get_structure(), gda_meta_store_schema_get_structure, errthrow)
   _WRAP_METHOD(Glib::SListHandle<Glib::ustring> schema_get_all_tables(), gda_meta_store_schema_get_all_tables)

Modified: libgdamm/trunk/libgda/src/metastruct.hg
==============================================================================
--- libgdamm/trunk/libgda/src/metastruct.hg	(original)
+++ libgdamm/trunk/libgda/src/metastruct.hg	Sun Jan  4 14:14:40 2009
@@ -80,6 +80,8 @@
   _WRAP_METHOD(GdaMetaTableColumn* get_table_column(GdaMetaTable* table, const Value& col_name), gda_meta_struct_get_table_column)
   _WRAP_METHOD(Glib::ustring dump_as_graph(MetaGraphInfo info), gda_meta_struct_dump_as_graph, errthrow)
   
+  _WRAP_METHOD(bool complement_all(), gda_meta_struct_complement_all, errthrow)
+    
   // FIXME: Use C++ type
   _WRAP_METHOD(GSList* get_all_db_objects(), gda_meta_struct_get_all_db_objects)
     

Modified: libgdamm/trunk/libgda/src/row.hg
==============================================================================
--- libgdamm/trunk/libgda/src/row.hg	(original)
+++ libgdamm/trunk/libgda/src/row.hg	Sun Jan  4 14:14:40 2009
@@ -54,6 +54,7 @@
   _WRAP_CREATE(int count)
 
   _WRAP_METHOD(Value get_value(int num), gda_row_get_value)
+  _WRAP_METHOD(int get_length(), gda_row_get_length)
 };
 
 } // namespace Gda



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