gda.data_model
Module for [DataModel] interface
class DataModelException
Types 3
interfaceDataModel
Methods
bool addDataFromXmlNode(libxml2.types.NodePtr node)Adds the data from an XML node to the given data model (see the DTD for that node in the $prefix/share/libgda/dtd/libgda-array.dtd file).int appendRow()Appends a row to the data model (the new row will possibly have NULL values for all columns, or some other values depending on the data model implementation)int appendValues(gobject.value.Value[] values = null)Appends a row to the given data model. If any value in values is actually null, then it is considered as a default value. If values is null then all values are set to their default value.gda.data_model_array.DataModelArray arrayCopyModel()Makes a copy of src into a new #GdaDataModelArray object Returns: a new data model, or null if an error occurred Throws: [DataModelException]gda.data_model_array.DataModelArray arrayCopyModelExt(int[] cols)Like [gda.data_model.DataModel.arrayCopyModel], makes a copy of src, but copies only some columns.gda.data_model_iter.DataModelIter createIter()Creates a new iterator object #GdaDataModelIter object which can be used to iterate through rows in model. The new #GdaDataModelIter does not hold any reference to model (ie. if model is destroyed ...gda.column.Column describeColumn(int col)Queries the underlying data model implementation for a description of a given column. That description is returned in the form of a #GdaColumn structure, which contains all the information about th...void dump(void * toStream = null)Dumps a textual representation of the model to the to_stream streamstring dumpAsString()Dumps a textual representation of the model into a new string. The main differences with [gda.data_model.DataModel.exportToString] are that the formatting options are passed using environment varia...bool exportToFile(gda.types.DataModelIOFormat format, string file, int[] cols, int[] rows, gda.set.Set options)Exports data contained in model to the file file; the format is specified using the format argument. Note that the date format used is the one used by the connection from which the data model has b...string exportToString(gda.types.DataModelIOFormat format, int[] cols, int[] rows, gda.set.Set options)Exports data contained in model to a string; the format is specified using the format argument, see the [gda.data_model.DataModel.exportToFile] documentation for more information about the options ...void freeze()Disables notifications of changes on the given data model. To re-enable notifications again, you should call the #gdadatamodel_thaw function.gda.types.DataModelAccessFlags getAccessFlags()Get the attributes of model such as how to access the data it contains if it's modifiable, etc. Returns: an ORed value of #GdaDataModelAccessFlags flagsgda.types.ValueAttribute getAttributesAt(int col, int row)Get the attributes of the value stored at (row, col) in model, which is an ORed value of #GdaValueAttribute flags. As a special case, if row is -1, then the attributes returned correspond to a "wou...int getColumnIndex(string name)Get the index of the first column named name in model.string getColumnName(int col)string getColumnTitle(int col)int getNColumns()int getNRows()bool getNotify()Returns the status of notifications changes on the given data model. Returns:gobject.value.Value getTypedValueAt(int col, int row, gobject.types.GType expectedType, bool nullok)Upon errors null will be returned and error will be assigned a #GError from the #GDADATAMODEL_ERROR domain.gobject.value.Value getValueAt(int col, int row)Retrieves the data stored in the given position (identified by the col and row parameters) on a data model.bool iterAtRow(gda.data_model_iter.DataModelIter iter, int row)Moves iter to the row number given by row.bool iterNext(gda.data_model_iter.DataModelIter iter)Moves iter to the next row in model.bool iterPrev(gda.data_model_iter.DataModelIter iter)Moves iter to the next row in model.bool iterSetValue(gda.data_model_iter.DataModelIter iter, int col, gobject.value.Value value)Set value to the given column and row pointed by iter in the given model.bool removeRow(int row)Removes a row from the data model.void reset()Emits the 'reset' and 'changed' signal on model.void rowInserted(int row)Emits the 'row_inserted' and 'changed' signals on model.void rowRemoved(int row)Emits the 'row_removed' and 'changed' signal on model.void rowUpdated(int row)Emits the 'row_updated' and 'changed' signals on model.void sendHint(gda.types.DataModelHint hint, gobject.value.Value hintValue = null)Sends a hint to the data model. The hint may or may not be handled by the data model, depending on its implementationvoid setColumnName(int col, string name)Sets the name of the given col in model, and if its title is not set, also sets the title to name.void setColumnTitle(int col, string title)Sets the title of the given col in model.void setNotify(bool doNotifyChanges)Enable or disable notifications changes on the given data model.bool setValueAt(int col, int row, gobject.value.Value value)Modifies a value in model, at (col, row).bool setValues(int row, gobject.value.Value[] values = null)In a similar way to [gda.data_model.DataModel.setValueAt], this method modifies a data model's contents by setting several values at once.void thaw()Re-enables notifications of changes on the given data model.gulong connectAccessChanged(T)(T callback, Flag!"After" after = No.After)Connect to `AccessChanged` signal.gulong connectChanged(T)(T callback, Flag!"After" after = No.After)Connect to `Changed` signal.gulong connectReset(T)(T callback, Flag!"After" after = No.After)Connect to `Reset` signal.gulong connectRowInserted(T)(T callback, Flag!"After" after = No.After)Connect to `RowInserted` signal.gulong connectRowRemoved(T)(T callback, Flag!"After" after = No.After)Connect to `RowRemoved` signal.gulong connectRowUpdated(T)(T callback, Flag!"After" after = No.After)Connect to `RowUpdated` signal.interfaceDataModelGidBuilderImpl(T)
classDataModelException : ErrorWrap