[gnome-db] create/drop table.



Hello,

The next area that I am looking at to get to work for both PostgreSQL as MySQL is "gda_connection_create_table" and "gda_connection_drop_table". The drop table is pretty straight forward and have that working. The create table is also not that difficult to make, but I have a question regarding the arguments. Currently the following function call is documented:

gboolean gda_connection_create_table (GdaConnection *cnc,
const gchar *table_name,
                                             const GdaDataModelColumnAttributes *attributes[]);

Regarding the last parameters. Why don't we use a type of GPtrArray or GList here? It would be more consistent with the rest of libgda, since this "plain" array type is used nowhere in the product. Also, how can we otherwise determine the length? Maybe I have go back to C programming lesson 1, but if the user does not supply a NULL terminated array, we may run into problems. Any ideas/comments?

Also, we probably need a gda_connection_create_index (and drop) for compound keys. How would those arguments look like, since GdaDataModelColumnAttributes is not a good structure to place them in. Any ideas/thoughts in this area?


Thanks,

Bas.



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