Re: [gnome-db] API differences



On Thu, 2008-08-28 at 11:37 -0700, Daniel Morgan wrote:
> Hey cj,
> 
> Suprised to see you on here.
> 
> Did you mean System.Data.OleDb?  Wasn't there some GDA# bindings in libgda?  I do not know how up-to-date they are.
> 
> Would it be better to map OleDb to other managed providers instead?
> 
> I'm not sure if anyone is actually using OleDb in Mono and if it's worth the effort to get it to work.  Most databases people would be using already have managed versions of those providers.  Unless, there is some specific driver in libgda that works but there isn't something available for Mono.
> 
> Unless, of course, someone can prove me wrong. 

>From my perspective (I'm the one who asked CJ about this), I'm not
really fussed about what happens in the back-end. My concern, as a
downstream packager, is to remove a dependency in Mono on an obsolete
and unsupported (at least by us) library. Simply switching the P/Invokes
to the appropriate gda-3 versions would remove some messy hacks to our
build system.

Looking at the code, there are 63 P/Invokes in libgda.cs. Some quick
analysis shows half of those are no longer in gda-3 and would require
some porting:

jms osc-franzibald:/tmp/mono-1.9.1
+dfsg/mcs/class/System.Data/System.Data.OleDb$ for i in $(grep -A1 gda-2
libgda.cs | grep extern | sed 's/.*extern //' | cut -f2 -d' '); do if
[ "x" == "x$(grep -r $i /usr/include/libgda-3.0)" ]; then echo "$i is
not in gda-3"; fi; done
gda_value_get_type is not in gda-3
gda_value_get_bigint is not in gda-3
gda_value_get_boolean is not in gda-3
gda_value_get_date is not in gda-3
gda_value_get_double is not in gda-3
gda_value_get_integer is not in gda-3
gda_value_get_single is not in gda-3
gda_value_get_smallint is not in gda-3
gda_value_get_string is not in gda-3
gda_value_get_tinyint is not in gda-3
gda_type_to_string is not in gda-3
gda_data_model_get_column_position is not in gda-3
gda_field_attributes_free is not in gda-3
gda_field_attributes_get_name is not in gda-3
gda_field_attributes_get_gdatype is not in gda-3
gda_field_attributes_get_defined_size is not in gda-3
gda_field_attributes_get_scale is not in gda-3
gda_field_attributes_get_allow_null is not in gda-3
gda_field_attributes_get_primary_key is not in gda-3
gda_field_attributes_get_unique_key is not in gda-3
gda_transaction_new is not in gda-3
gda_transaction_get_name is not in gda-3
gda_transaction_set_name is not in gda-3
gda_transaction_get_isolation_level is not in gda-3
gda_transaction_set_isolation_level is not in gda-3
gda_connection_execute_non_query is not in gda-3
gda_connection_execute_single_command is not in gda-3
gda_connection_get_errors is not in gda-3
gda_error_get_description is not in gda-3
gda_error_get_number is not in gda-3
gda_error_get_source is not in gda-3
gda_error_get_sqlstate is not in gda-3

This looks pretty consistent with the API changes noted on
http://library.gnome.org/devel/libgda-3.0/3.0/migration.html

Part of me thinks jumping all the way to gda-4 might be a little too
soon, since it would remove the ability for older distributions to run
more recent Monos, without needing to backport gda-4 as well. Then
again, if 3 is phased out the way 2 was once 4 lands, it might be
sensible to take the forward-thinking approach.



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