DataModelT

template DataModelT () {}

Members

Functions

addDataFromXmlNode
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).

appendRow
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)

appendValues
int appendValues(gobject.value.Value[] values)

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.

arrayCopyModel
gda.data_model_array.DataModelArray arrayCopyModel()

Makes a copy of src into a new #GdaDataModelArray object

arrayCopyModelExt
gda.data_model_array.DataModelArray arrayCopyModelExt(int[] cols)

Like gda.data_model.DataModel.arrayCopyModel, makes a copy of src, but copies only some columns.

connectAccessChanged
ulong connectAccessChanged(T callback, Flag!"After" after)

Connect to AccessChanged signal.

connectChanged
ulong connectChanged(T callback, Flag!"After" after)

Connect to Changed signal.

connectReset
ulong connectReset(T callback, Flag!"After" after)

Connect to Reset signal.

connectRowInserted
ulong connectRowInserted(T callback, Flag!"After" after)

Connect to RowInserted signal.

connectRowRemoved
ulong connectRowRemoved(T callback, Flag!"After" after)

Connect to RowRemoved signal.

connectRowUpdated
ulong connectRowUpdated(T callback, Flag!"After" after)

Connect to RowUpdated signal.

createIter
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 at some point, the new iterator will become useless but in any case it will not prevent the data model from being destroyed).

describeColumn
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 the given column in the data model.

dump
void dump(void* toStream)

Dumps a textual representation of the model to the to_stream stream

dumpAsString
string 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 variables, and that the data is dumped regardless of the user locale (e.g. dates are not formatted according to the locale).

exportToFile
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 been made (as the result of a SELECT statement), or, for other kinds of data models, the default format (refer to gda.data_handler.DataHandler.getDefault) unless the "cnc" property has been set and points to a #GdaConnection to use that connection's date format.

exportToString
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 argument (except for the "OVERWRITE" option).

freeze
void freeze()

Disables notifications of changes on the given data model. To re-enable notifications again, you should call the #gda_data_model_thaw function.

getAccessFlags
gda.types.DataModelAccessFlags getAccessFlags()

Get the attributes of model such as how to access the data it contains if it's modifiable, etc.

getAttributesAt
gda.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 "would be" value if a row was added to model.

getColumnIndex
int getColumnIndex(string name)

Get the index of the first column named name in model.

getColumnName
string getColumnName(int col)
getColumnTitle
string getColumnTitle(int col)
getNColumns
int getNColumns()
getNRows
int getNRows()
getNotify
bool getNotify()

Returns the status of notifications changes on the given data model.

getTypedValueAt
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 #GDA_DATA_MODEL_ERROR domain.

getValueAt
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.

iterAtRow
bool iterAtRow(gda.data_model_iter.DataModelIter iter, int row)

Moves iter to the row number given by row.

iterNext
bool iterNext(gda.data_model_iter.DataModelIter iter)

Moves iter to the next row in model.

iterPrev
bool iterPrev(gda.data_model_iter.DataModelIter iter)

Moves iter to the next row in model.

iterSetValue
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.

removeRow
bool removeRow(int row)

Removes a row from the data model.

reset
void reset()

Emits the 'reset' and 'changed' signal on model.

rowInserted
void rowInserted(int row)

Emits the 'row_inserted' and 'changed' signals on model.

rowRemoved
void rowRemoved(int row)

Emits the 'row_removed' and 'changed' signal on model.

rowUpdated
void rowUpdated(int row)

Emits the 'row_updated' and 'changed' signals on model.

sendHint
void sendHint(gda.types.DataModelHint hint, gobject.value.Value hintValue)

Sends a hint to the data model. The hint may or may not be handled by the data model, depending on its implementation

setColumnName
void 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.

setColumnTitle
void setColumnTitle(int col, string title)

Sets the title of the given col in model.

setNotify
void setNotify(bool doNotifyChanges)

Enable or disable notifications changes on the given data model.

setValueAt
bool setValueAt(int col, int row, gobject.value.Value value)

Modifies a value in model, at (col, row).

setValues
bool setValues(int row, gobject.value.Value[] values)

In a similar way to gda.data_model.DataModel.setValueAt, this method modifies a data model's contents by setting several values at once.

thaw
void thaw()

Re-enables notifications of changes on the given data model.