- public bool add_data_from_xml_node (unowned Node* node) throws Error
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.
- public abstract int append_row () throws Error
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)
- public abstract int append_values (List<Value?>? values) throws Error
Appends a row to the given data model.
- public DataModelArray? array_copy_model () throws Error
- public DataModelArray? array_copy_model_ext (int[] cols) throws Error
- public abstract DataModelIter create_iter ()
Creates a new iterator object
DataModelIter object which can be used to iterate through rows in
this.
- public abstract unowned Column? describe_column (int col)
Queries the underlying data model implementation for a description of
a given column.
- public void dump (void* to_stream)
Dumps a textual representation of the this
to the to_stream
stream
- public string dump_as_string ()
Dumps a textual representation of the this
into a new string.
- public bool export_to_file (DataModelIOFormat format, string file, int[]? cols, int[]? rows, Set options) throws Error
Exports data contained in this to
the file
file; the format is specified using the format
argument.
- public string export_to_string (DataModelIOFormat format, int[]? cols, int[]? rows, Set options)
Exports data contained in this to a
string; the format is specified using the format
argument, see the
export_to_file documentation for more information about the
options
argument (except for the "OVERWRITE" option).
- public void freeze ()
Disables notifications of changes on the given data model.
- public abstract DataModelAccessFlags get_access_flags ()
Get the attributes of this such as
how to access the data it contains if it's modifiable, etc.
- public abstract ValueAttribute get_attributes_at (int col, int row)
Get the attributes of the value stored at (row, col) in
this, which is an ORed value of ValueAttribute
flags.
- public int get_column_index (string name)
Get the index of the first column named name
in
this.
- public unowned string get_column_name (int col)
- public unowned string get_column_title (int col)
- public abstract unowned Error[] get_exceptions ()
Get the global data model exception(s) that occurred when using
this.
- public abstract int get_n_columns ()
- public abstract int get_n_rows ()
- public abstract bool get_notify ()
Returns the status of notifications changes on the given data model.
- public abstract int get_row_from_values (SList<Value?> values, int[] cols_index)
Returns the first row where all the values in values
at
the columns identified at cols_index
match.
- public unowned Value? get_typed_value_at (int col, int row, Type expected_type, bool nullok) throws Error
Upon errors null
will be returned and error
will be assigned a Error from the DataModelError
domain.
- public abstract unowned Value? get_value_at (int col, int row) throws Error
Retrieves the data stored in the given position (identified by the
col
and row
parameters) on a data model.
- public bool import_from_file (string file, HashTable<int,int>? cols_trans, Set options) throws Error
Imports data contained in the file
file into
this; the format is detected.
- public bool import_from_model (DataModel from, bool overwrite, HashTable<int,int>? cols_trans) throws Error
Copy the contents of the from
data model to the
this data model.
- public bool import_from_string (string string, HashTable<int,int>? cols_trans, Set options) throws Error
Loads the data from string
into
this.
- public abstract bool iter_at_row (DataModelIter iter, int row)
Moves iter
to the row number given by row
.
- public abstract bool iter_next (DataModelIter iter)
Moves iter
to the next row in
this.
- public abstract bool iter_prev (DataModelIter iter)
Moves iter
to the next row in
this.
- public abstract bool iter_set_value (DataModelIter iter, int col, Value value) throws Error
Set value
to the given column
and row
pointed by iter
in the given this.
- public abstract bool remove_row (int row) throws Error
Removes a row from the data model.
- public abstract void send_hint (DataModelHint hint, Value? hint_value)
Sends a hint to the data model.
- public void set_column_name (int col, string name)
Sets the name
of the given col
in
this, and if its title is not set, also sets the title to name
.
- public void set_column_title (int col, string title)
Sets the title
of the given col
in
this.
- public abstract void set_notify (bool do_notify_changes)
Enable or disable notifications changes on the given data model.
- public abstract bool set_value_at (int col, int row, Value value) throws Error
Modifies a value in this, at (
col
, row
).
- public abstract bool set_values (int row, List<Value?>? values) throws Error
In a similar way to
set_value_at, this method modifies a data model's contents by
setting several values at once.
- public void thaw ()
Re-enables notifications of changes on the given data model.