Top | ![]() |
![]() |
![]() |
![]() |
GdaDataModelArrayGdaDataModelArray — An implementation of GdaDataModel based on a GArray. |
GObject ╰── GdaObject ╰── GdaDataModelRow ╰── GdaDataModelArray ╰── GdaDataModelFilterSQL
The GdaDataModelArray object is a data model which internally uses a GArray to index all its rows (represented as GdaRow objects). In this data model, all the data is stored in memory, which can be a memory limitation if the number of rows is huge.
This type of data model is easy to use to store some temporary data, and has a random access mode (any value can be accessed at any time without the need for an iterator).
GdaDataModel *
gda_data_model_array_new (gint cols
);
Creates a new GdaDataModel object without initializing the column
types. Using gda_data_model_array_new_with_g_types()
is usually better.
GdaDataModel * gda_data_model_array_new_with_g_types (gint cols
,...
);
Creates a new GdaDataModel object with the column types as specified.
GdaDataModel * gda_data_model_array_copy_model (GdaDataModel *src
,GError **error
);
Makes a copy of src
into a new GdaDataModelArray object
void gda_data_model_array_set_n_columns (GdaDataModelArray *model
,gint cols
);
Sets the number of columns for rows inserted in this model.
cols
must be greated than or equal to 0.
Also clears model
's contents.
void
gda_data_model_array_clear (GdaDataModelArray *model
);
Frees all the rows in model
.