There seems to be no db-independent way to represent a string in a db, and I 
think this is a flaw in the API.

Looking at the gda-mysql-ddl.c code shows me that the mysql provider takes the 
string value set for /FIELDS_A/@COLUMN_TYPE/%i as the text to use in the CREATE 
TABLE ddl statement.  However, different providers have different strings to 
use, and within mysql, for example, there are string limitations.  CHAR has a 
max length of 255 and VARCHAR has a max length of 255 before rev 5.0.3 and 
65535 after rev 5.0.3.  Calling gda_server_provider_get_default_dbms_type() 
doesn't help because you only pass the GType, not the string length.  I have 
some 2048-length strings (even longer would be better).

I am working on a libgda-based backend for the gnucash finance program, and as 
requirements, I need to support sqlite, mysql and postgresql backends.  I would 
prefer to be db-independent and and leave all dependencies to libgda.  Can we 
come up with a mechanism in libgda to return the correct string column type?

Phil
_______________________________________________
gnome-db-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-db-list

Reply via email to