GdaDbTable new functionality.
It is possible, for example, to have a new function gda_db_table_get_table ("table name"), which returns a GdaDbTable, and a function gda_db_column_get_column ("table name", "column name"), which returns a GdaDbColumn. This way we can make use of a very easy code.
GdaDbTable *table = gda_db_table_get_table (cnc, "TableUsers");
gda_db_base_set_name (GDA_DB_BASE (table), "NewName");
if (!gda_ddl_modifiable_rename (GDA_DDL_MODIFIABLE (table), cnc, table, NULL))
{
g_error ("Error");
}
GdaDbColumn *column = gdb_db_column_get_column (table, "ColumnName");
gda_db_column_set_name (column, "LastName");
g_object_set (column, "table", table, NULL);
if (!gda_ddl_modifiable_create (GDA_DDL_MODIFIABLE (column), cnc, NULL, NULL))
g_error ("Error");
A very simple and easy way to change a table or column.