GNOME Data Access manual |
---|
Values returned by functions of managing data are GdaValue objects. GdaValue class has many functions to access data, so we show the most important ones of them:
There are many functions to know what is the type of a value and to manage values, that can be seen in GdaValue class.
We will return to the examples about last section to notice some important details:
void show_table2 (GdaDataModel * dm) { gint row_id; gint column_id; GdaValue *value; GdaRow *row; gchar *string; for (column_id = 0; column_id < gda_data_model_get_n_columns (dm); column_id++) g_print("%s\t",gda_data_model_get_column_title (dm, column_id)); g_print("\n"); for (row_id = 0; row_id < gda_data_model_get_n_rows (dm); row_id++) { row = (GdaRow *) gda_data_model_get_row (dm, row_id); for (column_id = 0; column_id < gda_data_model_get_n_columns (dm); column_id++) { value = gda_row_get_value (row, column_id); string=gda_value_stringify (value); g_print ("%s\t", string); gda_value_free(value); g_free(string); } g_print ("\n"); } }
<<< Managing data models | Transactions and batch processes >>> |