DataModel
Object Hierarchy:
Description:
All known implementing classes:
Namespace: Gda
Package: libgda-6.0
Content:
Static methods:
- public static Quark error_quark ()
Methods:
- 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 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 int append_values (List<Value?>? values) throws Error
Appends a row to the given data model.
- public DataModelArray? array_copy_model () throws Error
Makes a copy of this into a new DataModelArray object
- public DataModelArray? array_copy_model_ext (int[] cols) throws Error
Like array_copy_model, makes a copy of this, but copies only some columns.
- public DataModelIter create_iter ()
Creates a new iterator object DataModelIter object which can be used to iterate through rows in this.
- public 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 theformat
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 theoptions
argument (except for the "OVERWRITE" option). - public void freeze ()
Disables notifications of changes on the given data model.
- public DataModelAccessFlags get_access_flags ()
Get the attributes of this such as how to access the data it contains if it's modifiable, etc.
- public 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 unowned Error[] get_exceptions ()
Get the global data model exception(s) that occurred when using this.
- public int get_n_columns ()
- public int get_n_rows ()
- public bool get_notify ()
Returns the status of notifications changes on the given data model.
- public 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 atcols_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 throws will be assigned a Error from the DataModelError domain.
- public unowned Value? get_value_at (int col, int row) throws Error
Retrieves the data stored in the given position (identified by the
col
androw
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 bool iter_move_next_default (DataModelIter iter)
Method reserved to DataModelIter implementations, should not be called directly.
- public bool iter_move_prev_default (DataModelIter iter)
Method reserved to DataModelIter implementations, should not be called directly.
- public bool iter_move_to_row_default (DataModelIter iter, int row)
Method reserved to DataModelIter implementations, should not be called directly.
- public bool remove_row (int row) throws Error
Removes a row from the data model.
- public 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 givencol
in this, and if its title is not set, also sets the title toname
. - public void set_column_title (int col, string title)
Sets the
title
of the givencol
in this. - public bool set_value_at (int col, int row, Value value) throws Error
Modifies a value in this, at (
col
,row
). - public 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.
Signals:
- public signal void access_changed ()
Gets emitted when
model
's access flags have changed. - public signal void changed ()
Gets emitted when any value in
model
has been changed - public signal void reset ()
Gets emitted when
model
's contents has been completely reset ( the number and type of columns may also have changed) - public signal void row_inserted (int row)
Gets emitted when a row has been inserted in
model
- public signal void row_removed (int row)
Gets emitted when a row has been removed from
model
- public signal void row_updated (int row)
Gets emitted when a row has been modified in
model
Inherited Members:
All known members inherited from class GLib.Object