Re: [gnome-db] How to create define size/set scale with GdaServerOperation.





On 8/28/06, Bas Driessen <bas driessen xobas com> wrote:


The COLUMN_TYPE value can be like "VARCHAR" or "VARCHAR(30)" or "SERIAL" or whatever the provider unserstands. You can't use something like G_VALUE_STRING as providers don't know about that.


Oh No !!! Why have you made it provider dependent on this level? The whole idea of libgda is to have a provider independent interface. The old situation was perfect where you could use values as G_TYPE_STRING or G_TYPE_INT64 etc etc and libgda would take care of the rest. For my programming I did not need to know what the actual data-provider is. Now I am forced to find out what the data provider is and create all kinds of if statements, create massive redundant code and do the work libgda is supposed to do.  Is there any way to make it more provider independent, or at least give us a choice (or give us back the old functionality which was working perfectly and required little coding only ...)

It is provider dependant regarding data types, I admit. The point is to set the barrier between something "relatively" simple and tolerant and something too restrictive considering the huge differences between the providers regarding non DML queries while still retaining _all_ the features one provider offers.

But saying that the old situation allowed to specify a GType and it would automatically be converted to the correct DBMS dependant type is false. I've never seen that. Moreover the gda_server_provider_get_default_dbms_type() call allows exactly to convert a GType to a DBMS dependant data type which you can use to avoid your problem.

Cheers,

Vivien




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